gpt4 book ai didi

python - 被 robots.txt : scrapy 禁止

转载 作者:IT老高 更新时间:2023-10-28 20:38:57 27 4
gpt4 key购买 nike

在抓取像 https://www.netflix.com 这样的网站时,被 robots.txt 禁止:https://www.netflix.com/>

错误:没有下载响应:https://www.netflix.com/

最佳答案

在 2016-05-11 推出的新版本(scrapy 1.1)中,抓取首先下载 robots.txt,然后再抓取。要在您的 settings.py 中更改此行为,请使用 ROBOTSTXT_OBEY

ROBOTSTXT_OBEY = False

这里是 release notes

关于python - 被 robots.txt : scrapy 禁止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37274835/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com