CodePudding user response:
Try to encodeCodePudding user response:
First, you need to have a look at the site code:For gb2312, but an error after it is changed, it is ok to GBK
Code:
The from urllib import request
Url="https://yuedu.baidu.com/partner/view/zhongxinchuban? Fr=pidx '
The response=request. Urlopen (url=url)
Print (response. The read (). The decode (' GBK '))
Next time, remember to write the link on post,