import urllib2import syscontent = urllib2.urlopen("http://www.higis.cn").read() #网站页面是utf-8编码的。
type = sys.getfilesystemencoding() # 关键print content.decode("UTF-8").encode(type) # 关键
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。