xicispiders.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:scrapyweixi 作者: Felix-P-Code 项目源码 文件源码
def parse(self, response):
        sel = scrapy.Selector(response)
        #print(sel.xpath('//title').extract())
        fligint_div = "//ul[@class='news-list2']/li[1]/div[@class='gzh-box2']/div[@class='img-box']/a[1]/@href"
        first_url_list = sel.xpath(fligint_div).extract()
        self.first_url = first_url_list[0]
        print(self.first_url)
        yield  scrapy.Request(self.first_url,meta=self.meta, callback=self.parse_url_list)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号