scrapy shell加请求头
$ scrapy shell
...
>>> from scrapy import Request
>>> req = Request(url, headers=headers)
>>> fetch(req)
>>>response.text # 这样一般就有数据了
$ scrapy shell
...
>>> from scrapy import Request
>>> req = Request(url, headers=headers)
>>> fetch(req)
>>>response.text # 这样一般就有数据了
本文标题:Scrapy技巧总结
本文链接:https://www.haomeiwen.com/subject/ufhvlxtx.html
网友评论