diff --git a/Scripts/validation.py b/Scripts/validation.py index 9c436f29..51569438 100644 --- a/Scripts/validation.py +++ b/Scripts/validation.py @@ -32,6 +32,12 @@ def validate_video_id(video_url_or_id, silent=False, pass_exception=False, basic id=possibleVideoID, fields='items/id,items/snippet/channelId,items/snippet/channelTitle,items/statistics/commentCount,items/snippet/title', ).execute() + + # Checks if video exists but is unavailable + if result['items'] == []: + print(f"\n{B.RED}{F.WHITE} ERROR: {S.R} {F.RED}No info returned for ID: {S.R} {possibleVideoID} {F.LIGHTRED_EX} - Video may be unavailable or deleted.{S.R}") + return False, None, None, None, None + if possibleVideoID == result['items'][0]['id']: channelID = result['items'][0]['snippet']['channelId'] channelTitle = result["items"][0]["snippet"]["channelTitle"] diff --git a/YTSpammerPurge.py b/YTSpammerPurge.py index f8c9bef9..6d08d00c 100644 --- a/YTSpammerPurge.py +++ b/YTSpammerPurge.py @@ -530,6 +530,7 @@ def primaryInstance(miscData): videoListResult[i] = validation.validate_video_id(enteredVideosList[i]) # Sends link or video ID for isolation and validation if videoListResult[i][0] == False: validVideoIDs = False + validConfigSetting = False confirm = False break