{"id":24,"date":"2007-10-28T23:41:03","date_gmt":"2007-10-29T06:41:03","guid":{"rendered":"http:\/\/codefork.com\/blog\/index.php\/2007\/10\/28\/in-praise-of-feedparser\/"},"modified":"2007-10-28T23:41:03","modified_gmt":"2007-10-29T06:41:03","slug":"in-praise-of-feedparser","status":"publish","type":"post","link":"https:\/\/codefork.com\/blog\/index.php\/2007\/10\/28\/in-praise-of-feedparser\/","title":{"rendered":"In praise of feedparser"},"content":{"rendered":"<p>I discovered an issue this morning in the excellent <a href=\"http:\/\/feedparser.org\/\">feedparser<\/a> module.<\/p>\n<p>feedparser (aka Universal Feed Parser) has a reputation in the python community for being an incredible piece of code. With good reason: it understands a mind-boggling array of feed formats and versions, and it&#8217;s been put through the paces with a suite of 3262 unit tests. Mark Pilgrim&#8217;s terrific work has saved me (and many others, no doubt) months of toil and sweat.<\/p>\n<p>The issue has to do with encountering multiple &#8220;title&#8221; tags defined in different XML namespaces. A dc:title or media:title tag, if it is encountered anywhere after a regular RSS title tag, will overwrite it. Several other people have actually already documented this in the bug tracking system.<\/p>\n<p>It&#8217;s unclear how much work is actively being done with feedparser these days, so I reluctantly dived into the module to try to see what was going on. A little over an hour later, with almost no pain, I found myself with a patch that passed the test suite. I&#8217;d love to say it was due to my incredible coding prowess, but really, the code is just amazingly clean and easy to understand. That&#8217;s how fixing bugs should be.<\/p>\n<p>The patch is <a href=\"http:\/\/code.google.com\/p\/feedparser\/issues\/detail?id=18\">here<\/a> if anyone wants it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I discovered an issue this morning in the excellent feedparser module. feedparser (aka Universal Feed Parser) has a reputation in the python community for being an incredible piece of code. With good reason: it understands a mind-boggling array of feed formats and versions, and it&#8217;s been put through the paces with a suite of 3262 &hellip; <a href=\"https:\/\/codefork.com\/blog\/index.php\/2007\/10\/28\/in-praise-of-feedparser\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;In praise of feedparser&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,9],"tags":[],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-python","category-software"],"_links":{"self":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=24"}],"version-history":[{"count":0,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/24\/revisions"}],"wp:attachment":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}