scrapy crawl xxx 利用scrapy.shell.inspect_response 输出爬虫运行信息

来源:互联网 发布:北京seo哪家好 编辑:程序博客网 时间:2024/06/16 00:20

在scrapy框架中利用inspect_response在cmd上进入shell

import scrapyfrom scrapy.shell import inspect_responseclass MySpider(scrapy.Spider):    name = "example"    start_urls = [        "http://example.org",    ]    def parse(self, response):        inspect_response(response, self)








点击 ctrl-d退出终端,爬虫会从其停下的地方恢复爬取
不能使用fetch()命令

0 0