opener = urllib.request.build_opener() opener.addheaders = [('User-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36')] urllib.request.install_opener(opener) urllib.request.urlretrieve(img_url, filepath)
http://www.shanhubei.com/archives/2484.html
标签:python,request,urllib,537.36,opener,报错,urlretrieve From: https://www.cnblogs.com/shanhubei/p/16925407.html