EuropythonSpyder.py 文件源码

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

项目:pydata_webscraping 作者: jmortega 项目源码 文件源码
def process_response(self, response):
        item = EuropythonItem()
        print response
        item['title'] = response.xpath("//div[contains(@class, 'grid-100')]//h1/text()").extract()
        item['author'] = response.xpath("//div[contains(@class, 'talk-speakers')]//a[1]/text()").extract()
        item['description'] = response.xpath("//div[contains(@class, 'cms')]//p//text()").extract()
        item['date'] = response.xpath("//section[contains(@class, 'talk when')]/strong/text()").extract()
        item['tags'] = response.xpath("//div[contains(@class, 'all-tags')]/span/text()").extract()

        return item
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号