标签:port find class findall utf-8 provider txt VID code
import re
import urllib.request
string=‘<div class="name">(.*?)</div>‘
huo=urllib.request.urlopen("https://read.douban.com/provider/all").read()
huo=huo.decode("utf-8")
huo1=re.compile(string).findall(str(huo))
hom=open(‘D:\hom.txt‘,‘w‘)
hom.write(str(huo1))
hom.close()
简单易了
标签:port find class findall utf-8 provider txt VID code
原文地址:https://www.cnblogs.com/chunqing/p/9052761.html