1. 程式人生 > >爬蟲(scrapy第一篇)

爬蟲(scrapy第一篇)

pat span shell text -i col trac xpath http

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

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第一篇)