最赞回答 / 慕七七998
这个使用Python3.0写的,可以实现。import urllib.requestimport http.cookiejarurl = "http://www.baidu.com"print("--------------------------------------first------------------------------------------------------------")response1 = urllib.request.urlopen(url)print(respons...
2018-12-03
最新回答 / qq_慕工程3072899
fout = open("output.html", 'w', encoding='utf-8') fout.write('&tmlhtml&) #') #让浏览器以utf-8的编码显示 fout.write("&"&gmeta charset=\"utf-8\"&y&g") fout.write('&'&lbody&le&') fout.write('&in table&ata') for data in self.datas: ...
2018-12-02
最新回答 / 龙宸轩
python3.7.2(版本)from bs4 import BeautifulSoupimport re html_doc = """<html><head><title>The Dormouse's story</title></head><body><p class="title"><b>The Dormouse's story</b></p><p class="story"...
2018-11-27