大家好,又見面了,我是你們的朋友全棧君。
import
urllib2
import
sys
content
=
urllib2.urlopen(
'http://xxx.com'
).read()
#the webpage is encoded by uft-8
type
=
sys.getfilesystemencoding()
#important
print
content.decode(
"UTF-8"
).encode(
type
)
#important
發布者:全棧程序員棧長,轉載請注明出處:https://javaforall.cn/127938.html原文鏈接:https://javaforall.cn