diff --git a/.gitignore b/.gitignore index 067cb0e..77c9f2e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ meme.jpg toots.db toots.db-journal toots.db-wal +.mypy_cache/ __pycache__/ __pypackages__/ .vscode/ diff --git a/functions.py b/functions.py index d9e38cb..c290358 100644 --- a/functions.py +++ b/functions.py @@ -80,10 +80,10 @@ def extract_toot(toot): toot = html.unescape(toot) # convert HTML escape codes to text soup = BeautifulSoup(toot, "html.parser") for lb in soup.select("br"): # replace
with linebreak - lb.name = "\n" + lb.append('\n') for p in soup.select("p"): # ditto for

- p.name = "\n" + p.append('\n\n') for ht in soup.select("a.hashtag"): # convert hashtags from links to text ht.unwrap()