selenium抓取淘寶數據報錯:warnings.warn('Selenium support for PhantomJS has been deprecated, please use headless
阿新 • • 發佈:2018-07-28
png support https install dep 版本問題 報錯信息 sdn bubuko
ssh://[email protected]:22/root/anaconda3/bin/python3 -u /www/python3/maoyantop100/meishi_selenium.py /root/anaconda3/lib/python3.6/site-packages/selenium/webdriver/phantomjs/webdriver.py:49: UserWarning: Selenium support for PhantomJS has been deprecated, please use headless versions of Chrome or Firefox instead warnings.warn(‘Selenium support for PhantomJS has been deprecated, please use headless ‘
錯誤原因:Selenium 已經棄用 PhantomJS ,請使用火狐或者谷歌無界面瀏覽器。
解決方法:selenium的版本問題,使用
pip show selenium
顯示默認安裝的是3.13.1
版本
卸載當前版本
pip uninstall selenium
卸載之後重新安裝selenium 版本2.48.0
安裝成功,專門寫出來這個版本號是因為我使用2.0.0安裝報錯
pip install selenium==2.48.0
再次運行爬取淘寶商品數據信息後,該報錯信息就消失了,此處就不貼圖了,親測可用。
參考博文: Selenium分手PhantomJS
selenium抓取淘寶數據報錯:warnings.warn('Selenium support for PhantomJS has been deprecated, please use headless