Skip to content

Commit

Permalink
Make print statements more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
rameezk committed Oct 12, 2022
1 parent e9efdb9 commit 93343c4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scrub.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@ def scrub_tweets():
failed_to_delete += 1
except TwitterRateLimitException as e:
print(e)
return
return # Need to return and sleep to honour rate limit

time.sleep(1)

if failed_to_delete == 0:
print(f"{total_tweets} tweets have been successfully deleted.")
else:
print(f"Deleted {total_tweets - failed_to_delete} of {total_tweets}")
if failed_to_delete > 0:
print(f"{failed_to_delete} tweets failed to delete.")


Expand All @@ -61,4 +60,4 @@ def scrub_tweets():
api.refresh_token()
scrub_tweets()
print("Sleeping for 30 minutes")
time.sleep(1800) # 30 minutes
time.sleep(30 * 60) # 30 minutes

0 comments on commit 93343c4

Please sign in to comment.