[問題] phantomJS爬蟲網址問題

作者: vincent14 (阿Q)   2020-03-22 16:10:00
大家好
我分別用chromedriver和phantomjs爬pchome
q的部分是我自訂的商品名稱
https://i.imgur.com/ubQbc07.jpg
用chromedriver可以正常進入網頁
https://i.imgur.com/sGZkA0i.jpg
而phantomjs卻沒辦法
https://i.imgur.com/BGAy6kx.jpg
想請問各位問題是出在哪?
作者: jn8029 (宅男8029)   2020-03-22 16:47:00
chrome會自己幫你encode你的"口罩", phantomjs部會先把你的product encode後在做urlencodedProduct = urllib.parse.quote(product)driver.get(url + encodedProduct)

Links booklink

Contact Us: admin [ a t ] ucptt.com