سؤال

I am trying to display content from an external rss feed on my django based site using a handy inclusion tag I found in this snippet: djangosnippets.org/snippets/311/

However, feedparser is choking on the rss feed in question (http://softplc.com/blog/blogs/xmlsrv/rss2.php?blog=2) which works just fine-and-dandy in an online rss viewer (www.seekfreak.com/rss/) as well as being declared 'valid' by feedvalidator.org

Error received is: SAXParseException('Opening and ending tag mismatch: meta line 7 and head\n',)

...which would make sense, except there isn't a meta tag in the XML from that feed. It looks like feedparser is trying to read the html from softplc.com/blog/blogs/ instead of the full rss link or something? (and even then I don't see a tag mismatch as referenced)

So, what gives, feedparser?

هل كانت مفيدة؟

المحلول

Did a little checking with wget, and whaddya know but I was trying to get the content from the wrong server. Long story short, there was an /etc/hosts entry mapping the domain in question to the external IP of the 'not working' box - delete that and all is well.

Excuse: box in question is being worked on as a replacement for the existing site, so it will eventually really BE the correct domain (just not yet).

@Joe - thanks for the sanity check, seeing that it was working elsewhere led to the fix!

Word to the (un)wise: check your network stuff!

Feedparser, I'm sorry I doubted you!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top