http error 301 for urlopen
Wenhuan Yu
yuwenhuan at gmail.com
Sun Nov 7 20:30:23 EST 2010
I tried to open a link with urlopen:
import urllib2
alink = "
http://feeds.nytimes.com/click.phdo?i=ff074d9e3895247a31e8e5efa5253183"
f = urllib2.urlopen(alink)
print f.read()
and got the followinig error:
urllib2.HTTPError: HTTP Error 301: The HTTP server returned a redirect error
tha
t would lead to an infinite loop.
The last 30x error message was:
Moved Permanently
I can open the link in browser. Any way to get solve this? Thanks.
Wen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20101107/445d5c9f/attachment.html>
More information about the Python-list
mailing list