Midnight Pub

feed me content

~orchard

Hi ~bartender. Some chai please.

I don't want to attract the wrong kind of attention here, and don't mean to disrespect the pub at all.

BUT

I have created something. Well, it is the same feed for midnight pub, but it contains the content of posts as well, so I can read it easily from my feedreader. I have hosted it on my website. Here is the code for python if you want to use it too:

import xmltodict

a = requests.get("https://midnight.pub/feed.xml").text
xm = xmltodict.parse(a)
o = xm['feed']['entry']

for entry in o:
    htmltext = requests.get(entry['link']['@href'].replace("gemini","https")).text.split("<form")[0].split("<body >")[1]
    entry['content'] = {'#text': htmltext}
    entry['content']['@type'] = "html"

xm['feed']['entry'] = o
z = xmltodict.unparse(xm)

with open('feed.xml','w') as f:
    f.write(z)

2pie

Wow that would be great ! Do you have a link for the updated feed ?

reply

orchard

You can use this -> https://gtlsgamr.tilde.team/midnightfeed.xml

reply

2pie

Great, thanks :)

reply

owleyarc

Nice! I've been meaning to try going back to feed readers.

reply