order.py 文件源码

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

项目:presidency 作者: jayrav13 项目源码 文件源码
def get(self):

        page = requests.get(self.url)
        self.tree = html.document_fromstring(page.text)

        output = {
            "text" : self.tree.xpath('//span[@class="displaytext"]')[0].text_content(),
            "date": self.tree.xpath('//span[@class="docdate"]')[0].text_content(),
            "title": self.tree.xpath('//title')[0].text_content(),
            "id": self.id,
            "url": self.url,
            "president": self.tree.xpath('//title')[0].text_content().split(':')[0]
        }

        return output
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号