selenium crawls to Taobao data is directed to the landing page, how to deal with
related codes
def search ():
try:
browser.get("https://www.taobao.com")
input = wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "-sharpq")))
submit = wait.until(
EC.element_to_be_clickable((By.CSS_SELECTOR, "-sharpJ_TSearchForm > div.search-button > button")))
input.send_keys("")
time.sleep(10)
submit.click()
total = wait.until(EC.presence_of_element_located(
(By.CSS_SELECTOR, "-sharpmainsrp-pager > div > div > div > div.total")))
return total.text
except TimeoutError:
return search()