???????????.py 文件源码

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

项目:Python 作者: ANT-Pi 项目源码 文件源码
def get_content(source):
    '''
    get the content from the source code page
    :param source:
    :return:
    '''
    selector = html.document_fromstring(source)
    content = selector.xpath('//div[@class="readtext"]')[0]
    num = content.xpath('h4/text()')
    every_content = content.xpath('p/text()')
    write_file(num)
    for each in every_content:
        write_file(each)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号