importre,sys,urllib,codecs xh=urllib.urlopen("http://www.baidu.com/s?q1=123&rn=100").read().decode('utf-8') rc=re.compile(r'(?P<first>.*?)',re.I) match=rc.finditer(xh) rcr=re.compile(r'<[^>]+>',re.I) f=codecs.open("xiaohei.txt","w","utf-8") foriinrc.finditer...
www.dbjr.com.cn/article/691...htm 2025-6-7