赞
踩
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36',
- }
-
- req = requests.get(url,headers=headers)
- # 如果设置为replace,则会用?取代非法字符,''也可
- print(req.content.decode('gbk','replace'))
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。