|
|
|
@ -21,10 +21,10 @@ def scraper():
|
|
|
|
|
try:
|
|
|
|
|
supabase.table("suchmeme").insert(item).execute()
|
|
|
|
|
print(f'Inserted meme {item["id"]} to Supabase DB')
|
|
|
|
|
post(item)
|
|
|
|
|
except Exception as e:
|
|
|
|
|
if 'duplicate key value violates unique constraint' in str(e):
|
|
|
|
|
print("Meme already exists")
|
|
|
|
|
post(item)
|
|
|
|
|
continue
|
|
|
|
|
else:
|
|
|
|
|
print(f'Error upon inserting data in DB with meme {item["id"]} due to {e}')
|
|
|
|
|