url = 'https://pic.netbian.com/tupian/24072.html'
res = requests.get(url=url)
if '<meta charset="gbk"' in str(res.content):
cont = res.content.decode('gbk',errors='ignore')
else:
cont = res.content.decode('gb18030',errors='ignore')
相关文章
url = 'https://pic.netbian.com/tupian/24072.html'
res = requests.get(url=url)
if '<meta charset="gbk"' in str(res.content):
cont = res.content.decode('gbk',errors='ignore')
else:
cont = res.content.decode('gb18030',errors='ignore')