Skip to content

Commit

Permalink
don't don final log if too small
Browse files Browse the repository at this point in the history
and log likes
  • Loading branch information
datawhores committed May 26, 2024
1 parent c9e7d30 commit 40ff82f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ofscraper/commands/helpers/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ async def wrapper(userdata,session,*args, **kwargs):
raise e
finally:
progress_utils.increment_user_activity()
for record in chain.from_iterable(data):
records=chain.from_iterable(data)
if len(records)<2:
return
for record in records:
log.warning(record)

return wrapper
Expand Down
1 change: 1 addition & 0 deletions ofscraper/commands/scraper/actions/like.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def _like(model_id, username,ids: list, like_action: bool):
text_out=f"[bold]\\[{username}][/bold] [bold]\\[Action {title}][/bold] ({post} post checked, {liked} post changes to {action})"
progress_utils.remove_like_task(task)
progress_utils.remove_like_task(task2)
log.warning(text_out)
return text_out

def _toggle_like_requests(c, id, model_id):
Expand Down

0 comments on commit 40ff82f

Please sign in to comment.