diff --git a/app/functions.py b/app/functions.py
index 8fce953..6000617 100644
--- a/app/functions.py
+++ b/app/functions.py
@@ -21,12 +21,10 @@ def extract_post(post):
post = html.unescape(post) # convert HTML escape codes to text
soup = BeautifulSoup(post, "html.parser")
for lb in soup.select("br"): # replace
with linebreak
- lb.insert_after("\n")
- lb.decompose()
+ lb.replace_with("\n")
for p in soup.select("p"): # ditto for
- p.insert_after("\n") - p.unwrap() + p.replace_with("\n") for ht in soup.select("a.hashtag"): # convert hashtags from links to text ht.unwrap() @@ -34,8 +32,7 @@ def extract_post(post): for link in soup.select("a"): #ocnvert 0: + while not done and 'orderedItems' in j and len(j['orderedItems']) > 0: for oi in j['orderedItems']: if oi['type'] == "Create": # this is a status/post/toot/florp/whatever