=> 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("")[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)

=> Write a reply

Replies

=> ~2pie wrote (thread):

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

=> ~owleyarc wrote:

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

Proxy Information
Original URL
gemini://midnight.pub/posts/1243
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
169.456873 milliseconds
Gemini-to-HTML Time
0.738126 milliseconds

This content has been proxied by September (ba2dc).