I generate a RSS feed with the Python package feedgen and I am now trying to implement the PubSubHubbub protocol.
From what I understand here https://indieweb.org/How_to_publish_and_consume_WebSub I need to generate 2 HTML tags: one with rel attribute set to hub and href attribute set to https://pubsubhubbub.appspot.com/ and one with rel attribute set to self and href attribute set to the feed URL of the feed.
However, I am not able to do this. Any idea why ?
Here is my code:
from feedgen.feed import FeedGenerator
fg = FeedGenerator()
fg.id('https://test.test.com/')
fg.title('Testfeed')
fg.link( href='http://my_test_feed.xml', rel='self' )
fg.link( href='https://pubsubhubbub.appspot.com/', rel='hub' )
fg.subtitle('This is a cool test feed!')
fg.language('en')
rssfeed = fg.rss_str(pretty=True)
print(rssfeed)