Why Nostr? What is Njump?
2023-08-01 15:58:49

Mike Stone on Nostr: I'm a garbage #Python programmer, and even I can pull this off. import requests, ...

I'm a garbage #Python programmer, and even I can pull this off.

import requests, json, re

def strip_html(text):
pattern = re.compile(r"<.*?>", re.DOTALL)
return pattern.sub("", text)

i = "https://fosstodon.org/api/v1/timelines/public";
m = requests.get(i)
d = json.loads(m.content)

for x in d:
dat = x["account"]
txt = x["content"]
print (dat["display_name"] + " (" + dat["acct"] + "):")
print (strip_html(txt))
print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-")
Author Public Key
npub1l3ck4tnw7s928c8tk6kczewjhjmcd0lesf7jncs3zhd4wvxyj0sq02vnpa