google-code-export / feedparser

Automatically exported from code.google.com/p/feedparser
Other
1 stars 0 forks source link

redirect problem in URL #355

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am testing feedparser 5.1.1 with this url:
http://servicios.lanacion.com.ar/herramientas/rss/categoria_id=131

>>> import feedparser
>>> d = 
feedparser.parse("http://servicios.lanacion.com.ar/herramientas/rss/categoria_id
=131")
>>> print d
{'feed': {}, 'bozo': 1, 'bozo_exception': HTTPError(), 'entries': []}
>>> print d.bozo_exception
HTTP Error 302: The HTTP server returned a redirect error that would lead to an 
infinite loop.
The last 30x error message was:
http://detectionservicios.lanacion.com.ar

I have tested blanking ACCEPT_HEADER but also dont work.

Any clue how to solve this?

Original issue reported on code.google.com by nuncalau...@gmail.com on 15 May 2012 at 2:25

GoogleCodeExporter commented 9 years ago
The problem was lanacion.com.ar.
Checks for user_agent, so i have add this:

feedparser.USER_AGENT = "Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:9.0.1) 
Gecko/20100101 Firefox/9.0.1"

Original comment by nuncalau...@gmail.com on 16 May 2012 at 7:11

GoogleCodeExporter commented 9 years ago
Glad to hear you got that resolved.

Original comment by kurtmckee on 18 May 2012 at 3:38