pombreda / feedparser

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

No support for "RSS Redirection" #244

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It seems that there is no support for "RSS Redirection", that is redirecting a 
client to a new feed URL without HTTP redirects, as specified in 
http://cyber.law.harvard.edu/rss/rssRedirect.html.

Sample Feed using RSS Redirection: http://www.dancarlin.com/cswdc.xml

Original issue reported on code.google.com by koeglste...@gmail.com on 28 Dec 2010 at 4:32

GoogleCodeExporter commented 9 years ago
Attached is a patch that fixes this issue and a wellformed test case. Illformed 
version to follow.

Tested in Python 2.4 through 3.1, git branch at:
  https://github.com/kurtmckee/feedparser/tree/issue244

Original comment by kurtmckee on 5 Jan 2011 at 8:54

Attachments:

GoogleCodeExporter commented 9 years ago
Illformed version

Original comment by kurtmckee on 5 Jan 2011 at 8:55

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the patch! However, if I try this on the URL I mentioned in the 
original post, I get an expected result:

>>> import feedparser
>>> f = feedparser.parse('http://www.dancarlin.com/cswdc.xml')
>>> f.feed.newlocation
u'http://www.dancarlin.com/cswdc.xml'

When looking at the source of http://www.dancarlin.com/cswdc.xml it contains 
the lines

<redirect>
   <newLocation>http://feeds.feedburner.com/dancarlin/commonsense?format=xml</newLocation>
</redirect>

Am I missing something here?

Original comment by koeglste...@gmail.com on 10 Jan 2011 at 8:55

GoogleCodeExporter commented 9 years ago
No, you're absolutely right. I made a mistake and the test cases passed by 
chance. I've removed the initial patch and am attaching a new version. The test 
cases continue to pass in Python 2.4 through 3.1, but now the sample URL 
returns the feedburner-based URL as expected.

Thanks for testing and catching the mistake!

Original comment by kurtmckee on 10 Jan 2011 at 6:52

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in r356.

Original comment by kurtmckee on 15 Jan 2011 at 6:56

GoogleCodeExporter commented 9 years ago
Issue 266 has been merged into this issue.

Original comment by kurtmckee on 4 Apr 2011 at 11:11