前言
view指令用于(内部使用fetch指令)下载指定url内容,并将response内容在浏览器上展示出来
代码调试
进入view模块的run方法,哦。。。。。发现没有run方法,就找他爹的run方法
class Command(fetch.Command):
进入fetch模块的run方法,随后转至:点击打开链接
最后输出内容,将response通过webbrowser在浏览器中打开
def _print_response(self, response, opts): open_in_browser(response)
github地址
https://github.com/wangrenlei/debug_scrapy
结束