output1.py 文件源码

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

项目:python- 作者: secondtonone1 项目源码 文件源码
def getDetailList(self,content):
        pattern =re.compile(r'<h2><a target="_blank" href="(.*?)"'\
            +r'title="(.*?)">', re.S
            )
        #uf-8??????
        file = open('file.txt', 'w',encoding='gbk')

        file.write(content)

        file.close()

        result = re.findall(pattern, content)
        if not result:
            print('???????..............') 
        for item in result:
            self.getDetailPic(item)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号