import urllib2
url = 'http://www....'
opener = urllib2.build_opener()
opener.addheaders.append(('User-Agent' , 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'))
c = opener.open(url)
使用此代码,我收到此错误:
HTTP Error 416: Requested Range Not Satisfiable
我该如何解决?