Re: http error 301 for urlopen

2010-11-10 Thread Hans-Peter Jansen
On Tuesday 09 November 2010, 03:10:24 Lawrence D'Oliveiro wrote: > In message <4cd7987e$0$1674$742ec...@news.sonic.net>, John Nagle wrote: > >It's the New York Times' paywall. They're trying to set a > > cookie, and will redirect the URL until you store and return the > > cookie. > > And if t

Re: http error 301 for urlopen

2010-11-08 Thread Lawrence D'Oliveiro
In message <4cd7987e$0$1674$742ec...@news.sonic.net>, John Nagle wrote: >It's the New York Times' paywall. They're trying to set a cookie, > and will redirect the URL until you store and return the cookie. And if they find out you’re acessing them from a script, they’ll probably try to find

Re: http error 301 for urlopen

2010-11-07 Thread John Nagle
On 11/7/2010 5:51 PM, D'Arcy J.M. Cain wrote: On Sun, 7 Nov 2010 19:30:23 -0600 Wenhuan Yu wrote: 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 follow

Re: http error 301 for urlopen

2010-11-07 Thread Nobody
On Sun, 07 Nov 2010 20:51:50 -0500, D'Arcy J.M. Cain wrote: >> urllib2.HTTPError: HTTP Error 301: The HTTP server returned a redirect error >> that 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 th

Re: http error 301 for urlopen

2010-11-07 Thread D'Arcy J.M. Cain
On Sun, 7 Nov 2010 19:30:23 -0600 Wenhuan Yu wrote: > 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.HTTPEr