mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 08:38:59 +00:00
fedi dev is fun!!!
This commit is contained in:
parent
dada8514e4
commit
bd2b064153
1 changed files with 3 additions and 1 deletions
|
@ -25,6 +25,8 @@ def extract_post(post):
|
|||
ht.unwrap()
|
||||
|
||||
for link in soup.select("a"): #ocnvert <a href='https://example.com>example.com</a> to just https://example.com
|
||||
if 'href' in link:
|
||||
# apparently not all a tags have a href, which is understandable if you're doing normal web stuff, but on a social media platform??
|
||||
link.insert_after(link["href"])
|
||||
link.decompose()
|
||||
|
||||
|
|
Loading…
Reference in a new issue