第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

控制臺運行結果正確,但是輸出的output.html文件只有第一個python百科網址,其他的顯示不出來。

控制臺運行結果正確,但是輸出的output.html文件只有第一個python百科網址,其他的顯示不出來。

慕粉1914306576 2018-01-15 21:35:17
class HtmlOutputer(object):? ??? ??? ? def __init__(self):? ? ? ? self.datas = []? ??? ? def collect_data(self,data):? ? ? ? if data is None:? ? ? ? ? ? return? ? ? ? self.datas.append(data)? ? ? ? ? ? ??? ? def output_html(self):? ? ? ? fout = open(r'D:\baidu download\java\output.html', 'w')? ? ? ? fout.write("<html>") ? ? ? ?? ? ? ? fout.write("<body>")? ? ? ? fout.write("<table>")? ? ? ? for data in self.datas:? ? ? ? ? ? #fout.write('<meta charset="utf-8">')? ? ? ? ? ? fout.write("<tr>")? ? ? ? ? ? fout.write("<td>%s</td>" % data['url'])? ? ? ? ? ? fout.write("<td>%s</td>" % data['title'].encode('utf-8'))? ? ? ? ? ? fout.write("<td>%s</td>" % data['Summary'].encode('utf-8'))? ? ? ? fout.write("</table>")? ? ? ? fout.write("</body>")? ? ? ? fout.write("</html>")
查看完整描述

目前暫無任何回答

  • 0 回答
  • 1 關注
  • 1205 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號