We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
获取到搜索的input框后需要先.click()然后再.send_keys()
`def search(): try: print('start visit bilibili...') browser.get('https://www.bilibili.com/')
search_input = WAIT.until(EC.element_to_be_clickable((By.CSS_SELECTOR, "#nav-searchform > div.nav-search-content > input"))) search_input.click() search_input.send_keys('蔡徐坤篮球') search_submit = WAIT.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="nav-searchform"]/div[2]'))) search_submit.click() print('jump to new window') all_h = browser.window_handles browser.switch_to.window(all_h[1]) except TimeoutException: return search()`
Originally posted by @ls-6414 in #6 (comment)
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
这个还是不行啊,搜索进去之后,就会刷新到主页,一直重复,而不是直接进入下一页开始爬取内容
No branches or pull requests
获取到搜索的input框后需要先.click()然后再.send_keys()
`def search():
try:
print('start visit bilibili...')
browser.get('https://www.bilibili.com/')
Originally posted by @ls-6414 in #6 (comment)
The text was updated successfully, but these errors were encountered: