正确代码:
import urllib.request
url = "https://blog.csdn.net/john_bian/article/details/71025372?utm_source=itdadao&utm_medium=referral";
response = urllib.request.Request(url=url,method="GET");
result = urllib.request.urlopen(response);
html = result.read().decode("UTF8");
f = open("x.html","w",encoding="UTF8");
f.write(html);
f.close();
import urllib.request
url = "h