xueqiuPostSpider.py 文件源码

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

项目:stockSpider 作者: mizhdi 项目源码 文件源码
def parse_detail(self, response):
        url = urlparse.urlparse(response.url)
        path = url.path.split("/")

        item = PostItem()
        selector = Selector(response)

        item['postId'] = path[2]
        item['authorId'] = path[1]
        item['postDetail'] = selector.xpath('//div[@class="detail"]').extract()[0]

        yield item
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号