shengqiangzhang / examples-of-web-crawlers

一些非常有趣的python爬虫例子,对新手比较友好,主要爬取淘宝、天猫、微信、微信读书、豆瓣、QQ等网站。(Some interesting examples of python crawlers that are friendly to beginners. )
MIT License
13.91k stars 3.82k forks source link

2.天猫商品数据爬虫(已模拟登录) 报错 #96

Open anonymous2100 opened 4 years ago

anonymous2100 commented 4 years ago

C:\Users\Administrator\Downloads\examples-of-web-crawlers\2.天猫商品数据爬虫(已模拟登录)>tmall_crawler.py

DevTools listening on ws://127.0.0.1:57658/devtools/browser/ce173f91-456f-46c5-b389-189dd26c187f [21908:20924:0630/184159.033:ERROR:device_event_log_impl.cc(208)] [18:41:59.033] Bluetooth: bluetooth_adapter_winrt.cc:1150 RequestRadioAccessAsync failed: RadioAccessStatus::DeniedByUserWill not be able to change radio power. Traceback (most recent call last): File "C:\Users\Administrator\Downloads\examples-of-web-crawlers\2.天猫商品数据爬虫(已模拟登录)\tmall_crawler.py", line 216, in a.login() #登录 File "C:\Users\Administrator\Downloads\examples-of-web-crawlers\2.天猫商品数据爬虫(已模拟登录)\tmall_crawler.py", line 50, in login self.browser.find_element_by_xpath('//[@class="forget-pwd J_Quick2Static"]').click() File "D:\Program Files\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 394, in find_element_by_xpath return self.find_element(by=By.XPATH, value=xpath) File "D:\Program Files\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 976, in find_element return self.execute(Command.FIND_ELEMENT, { File "D:\Program Files\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "D:\Program Files\Python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//[@class="forget-pwd J_Quick2Static"]"} (Session info: chrome=83.0.4103.116)

python3.8.2 win10 x64企业版

Hyper-wyu commented 2 years ago

Same bro.