Last active
June 21, 2022 14:28
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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