From 3619a1f96312bb48fc290c9571bc4725de598993 Mon Sep 17 00:00:00 2001 From: datawhores Date: Thu, 28 Mar 2024 19:44:50 -0500 Subject: [PATCH] fix some double uploads --- ofscraper/actions/scraper.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/ofscraper/actions/scraper.py b/ofscraper/actions/scraper.py index 12252d161..1cb3d5444 100644 --- a/ofscraper/actions/scraper.py +++ b/ofscraper/actions/scraper.py @@ -70,7 +70,7 @@ async def process_messages(model_id, username, c): [output.extend(message.media) for message in messages_] log.debug(f"[bold]Messages media count[/bold] {len(output)}") - await operations.batch_mediainsert( + await operations.write_messages_table( output, model_id=model_id, username=username, @@ -242,12 +242,6 @@ async def process_timeline_posts(model_id, username, c): [output.extend(post.media) for post in timeline_posts] log.debug(f"[bold]Timeline media count without locked[/bold] {len(output)}") - await operations.batch_mediainsert( - output, - model_id=model_id, - username=username, - downloaded=False, - ) await operations.batch_mediainsert( output, model_id=model_id, @@ -342,12 +336,6 @@ async def process_pinned_posts(model_id, username, c): [output.extend(post.media) for post in pinned_posts] log.debug(f"[bold]Pinned media count without locked[/bold] {len(output)}") - await operations.batch_mediainsert( - output, - model_id=model_id, - username=username, - downloaded=False, - ) await operations.batch_mediainsert( output, model_id=model_id,