Lynnesbian / mstdn-ebooks

NO LONGER BEING UPDATED, NOT GUARANTEED TO WORK AT ALL
Mozilla Public License 2.0
34 stars 28 forks source link

Make bs4 only replace the tag name instead of name and contents #53

Closed AgathaSorceress closed 3 years ago

AgathaSorceress commented 3 years ago

The database's content column is currently empty because the whole toot is usually wrapped with <p> and

for p in soup.select("p"):
    p.replace_with("\n")

replaces both the contents of the paragraph and the tag name. This change should fix this problem and prevent ./gen.py from crashing because of empty contents uwu