如何使用scrapy刮取本地htm文件?

时间:2018-05-30 23:33:03

标签: html web-scraping scrapy

我尝试在本地htm文件上使用scrapy。我使用了url文件:/// path_to_local_file但是scrapy解析器似乎从响应中输出了空内容。我该怎么办? 谢谢!

EDIT:when I try to open up the local file with the browser, a window pops up with this info(click me). Is that the reason why my response is empty on scrapy? Thanks

1 个答案:

答案 0 :(得分:0)

我认为你需要设置一个服务器才能使用你正在尝试的方法。

但是,您始终可以将要解析的文件上传到免费托管服务,例如

000webhost