首页 > 代码库 > 爬虫(scrapy第一篇)

爬虫(scrapy第一篇)

------------------------------------------------------------------------------------------------------------------------------

scrapy shell http://bj.ganji.com/fang1/chaoyang/

 

In [1]: response
Out[1]: <200 http://bj.ganji.com/fang1/chaoyang/>

In [2]: view(response)
Out[2]: True

In [26]: response.xpath(‘‘‘//*[@class="f-list-item "]/dl/dd[5]/div[1]/span[1]/text()‘‘‘).extract()

------------------------------------------------------------------------------------------------------------------------------

 

爬虫(scrapy第一篇)