def search():
try: browser.get('https://www.taobao.com') input = wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, '#q'))) submit = wait.until( EC.element_to_be_clickable((By.CSS_SELECTOR, '#J_TSearchForm > div.search-button > button'))) input.send_keys('女装') time.sleep(10) submit.click() total = wait.until(EC.presence_of_element_located( (By.CSS_SELECTOR, '#mainsrp-pager > div > div > div > div.total'))) return total.text except TimeoutError: return search()
慕勒3428872
相关分类