New issue
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
使用requests可以正常请求,使用feapder提示浏览器版本过低,有点搞不懂 #129
Comments
贴下日志,可能是你urllib3版本低 |
C:\Users\lscoo\AppData\Local\Programs\Python\Python38\python.exe D:/projects/test/feapder-spiders/spiders/cantonfair_air_spider.py
2021-11-18 11:22:52.155 | INFO | feapder.core.spiders.air_spider:run:104 - 无任务,爬虫结束 进程已结束,退出代码为 0 |
C:\Users\lscoo\AppData\Local\Programs\Python\Python38\python.exe D:/projects/test/feapder-spiders/spiders/cantonfair_air_spider.py
2021-11-18 11:25:33.096 | INFO | feapder.core.spiders.air_spider:run:104 - 无任务,爬虫结束 进程已结束,退出代码为 0 |
我发现随机UA有时候的chrome header版本号是23这种低版本的,现在都96了。不知道是不是这原因导致,如果能给一个随机UA是高版本号的选择就好了 |
还真是这样,关闭随机ua就好了 |
刚看了里面的随机 user_agent.py pool,发现这文件内容是2016年的,所以这pool里面的UA都太老了。遇到一些检查UA的网站估计就像你遇到的情况一样。如果作者没空更新的话,我可以去搜集一些最新的提交PR。 |
import feapder
class CantonfairAirSpider(feapder.AirSpider):
def start_requests(self):
yield feapder.Request("https://www.cantonfair.org.cn",verify=True)
if name == "main":
CantonfairAirSpider().start()
The text was updated successfully, but these errors were encountered: