测试积点老人 发表于 2022-3-24 09:53:16

python爬虫中使用报错!

python爬虫中使用selenium browser.execute_script('window.scrollTo(0,document.body.scrollHeight)')报错Traceback (most recent call last):
File "D:\PracticePython\爬虫demo1\demo2.py\jdtest.py", line 134, in
main()
File "D:\PracticePython\爬虫demo1\demo2.py\jdtest.py", line 131, in main
next_page(i)
File "D:\PracticePython\爬虫demo1\demo2.py\jdtest.py", line 98, in next_page
browser.execute_script('window.scrollTo(0,document.body.scrollHeight)')
File "D:\python3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 879, in execute_script
return self.execute(command, {
File "D:\python3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 425, in execute
self.error_handler.check_response(response)
File "D:\python3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Command not found: POST /session/0f98442a-8de6-4ec3-9d10-589c13f11d89/execute/sync


kallinr 发表于 2022-3-25 09:22:04

不知道

jingzizx 发表于 2022-3-25 14:22:14

没成功调起来
页: [1]
查看完整版本: python爬虫中使用报错!