Changes
1 changed files (+5/-1)
-
-
@@ -3,9 +3,13 @@import re import psycopg2 # Fetch messages from database since it's way faster than using the API conn = psycopg2.connect(dbname="mastodon_production") cur = conn.cursor() cur.execute('SELECT * FROM statuses') statuses = cur.fetchall() text = [re.sub(r'<[^>]*>', '', status[2]) for status in statuses] # Get the messages as plain text text = [re.sub(r'<[^>]*>', '', status[2]) for status in statuses] # Use regex to remove HTML stuff print(text[0:100])
-