rubycocos / feedparser

feedparser gem - (universal) web feed parser and normalizer (XML w/ Atom or RSS, JSON Feed, HTML w/ Microformats e.g. h-entry/h-feed or Feed.HTML, Feed.TXT w/ YAML, JSON or INI & Markdown, etc.)
Creative Commons Zero v1.0 Universal
164 stars 11 forks source link

HTTPError 307 #7

Closed GeoHolz closed 5 years ago

GeoHolz commented 5 years ago

I don't understand why...

d = feedparser.parse('https://www2.yggtorrent.gg/rss?action=generate&type=cat&id=2145') d {'bozo': 1, 'entries': [], 'feed': {}, 'bozo_exception': <HTTPError 307: 'The HTTP server returned a redirect error that would lead to an infinite loop.\nThe last 30x error message was:\nTemporary Redirect'>}

geraldb commented 5 years ago

feedparser.parse does NOT fetch the feed (from the intertubes) it will ONLY parse the text. You have to fetch the feed text first with your HTTP library of choice. Cheers. Prost.

onli commented 5 years ago

The error message is very strange for that though.

geraldb commented 5 years ago

FYI: Double checking your error - you are using the PYTHON feedparser library - this library here is about RUBY.