Discovering Pubsubhubbub #47

simme opened this Issue Feb 12, 2013 · 2 comments

2 participants



I'm trying to figure out what the best way to extracting any pubsubhubbub reference from a given feed would be. I could just listen for the response event, but that would exclude functions like parseStr. Plus it seem kinda stupid when feedparser already is parsing the feed. :)

For those who do not know. Hubs are advertised as a <link>-tag with a rel="hub" attribute. Ie <link rel="hub" href="" />.

I tried just putting some code in handleOpenTag:

  if ( === n['#prefix'] + ':link') {
    if (n['@']['rel'] === 'hub') {
      this.meta['#hub'] = n['@']['rel'];

Neglecting the fact that the colon is hard coded and stuff, that works for the feeds I've tested. It's not very elegant though and probably breaks on lots of feeds. :P

Is this something that you as the author @danmactough feels like it could fit within feedparser? I'd be willing to make a patch and submit a pull requests. I just wanted to raise the issue and ask for some pointers. :)


@simme Thanks for the issue. I've been meaning to do this for a long time. 😄


Sweet! Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment