Skip to content

Commit

Permalink
Update Script - Add messaging for quota exceeded
Browse files Browse the repository at this point in the history
  • Loading branch information
ThioJoe committed Dec 23, 2021
1 parent af2e969 commit 03d2abb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion YouTubeSpammerPurge.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
### IMPORTANT: I OFFER NO WARRANTY OR GUARANTEE FOR THIS SCRIPT. USE AT YOUR OWN RISK.
### I tested it on my own and implemented some failsafes as best as I could,
### but there could always be some kind of bug. You should inspect the code yourself.
version = "2.2.4"
version = "2.2.5"
configVersion = 10
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

Expand Down Expand Up @@ -2739,6 +2739,12 @@ def scan_video(youtube, miscData, currentUser, filterMode, filterSubMode, videoI
print("(This also occurs if you try deleting comments on someone elses video, which is not possible.)")
elif reason == "commentsDisabled":
print("\n Error: Comments are disabled on this video. This error can also occur if scanning a live stream.")
elif reason == "quotaExceeded":
print("\n Error: You have exceeded the YouTube API quota. To do more scanning you must wait until the quota resets.")
print("There is a daily limit of 10,000 units/day, which works out to around reporting 10,000 comments/day.")
print("You can check your quota by searching 'quota' in the google cloud console.")
print(f"{F.YELLOW}Solutions: Either wait until tomorrow, or create additional projects in the cloud console.{S.R}")
input("\n Press Enter to Exit...")
input("\n Press Enter to Exit...")
else:
print(f"{F.RED}Unknown Error - Code: X-2{S.R} occurred. If this keeps happening, consider posting a bug report on the GitHub issues page, and include the above error info.")
Expand Down

0 comments on commit 03d2abb

Please sign in to comment.