2024-09-30 02:22:06 发布
网友
http://prntscr.com/o56670
请检查屏幕截图
我在我的终端中使用python3和scrapy。在
获取(“https://angel.co/adil-wali”)
当请求链接时,它用403响应。在
所以我已经改变和旋转用户代理和机器人服从错误,但仍然显示403响应,所以这次我买了crawera计划,但crawlera仍然说523响应
您知道为什么在scrapy shell中请求返回403而不是200个响应吗
尝试向您的请求添加标头:
fetch( "https://angel.co/adil-wali", headers={ "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "accept-language": "en-US,en;q=0.9,ru-RU;q=0.8,ru;q=0.7", "cache-control": "no-cache", "pragma": "no-cache", "upgrade-insecure-requests": "1" } )
通过这种方法,我能够从提到的URL得到响应200。在
尝试向您的请求添加标头:
通过这种方法,我能够从提到的URL得到响应200。在
相关问题 更多 >
编程相关推荐