Skip to content

Instantly share code, notes, and snippets.

@JayCuthrell
Last active June 21, 2022 14:28
Show Gist options
  • Save JayCuthrell/861ff681426efbdd34187609e21b96bf to your computer and use it in GitHub Desktop.
Save JayCuthrell/861ff681426efbdd34187609e21b96bf to your computer and use it in GitHub Desktop.
Pull my old Revue RSS feed before/after migration to Substack and replace with the proper vanity domain until it's gone
#!/usr/bin/python3
import feedparser
import time
# before...
# feed = feedparser.parse('https://sunday.fudge.org/?format=rss')
# after...
feed = feedparser.parse('https://sunday.fudge.org/feed')
for pub_date in feed.entries:
link = pub_date.link
# just in case...
fixed = link.replace("www.getrevue.co/profile/jaycuthrell","sunday.fudge.org")
print ('- ','[',pub_date.title,'](',fixed,')',time.strftime(' %Y %b %d',pub_date.published_parsed),sep="")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment