mirror of
https://github.com/ThioJoe/YT-Spammer-Purge.git
synced 2026-01-09 14:18:06 -05:00
Fix expired token refresh error
- Now removes both non-encrypted and encrypted token files only if they exist. Addresses #1040
This commit is contained in:
@@ -116,7 +116,10 @@ def first_authentication():
|
||||
except Exception as e:
|
||||
if "invalid_grant" in str(e):
|
||||
print(f"{F.YELLOW}[!] Invalid token{S.R} - Requires Re-Authentication")
|
||||
os.remove(TOKEN_FILE_NAME)
|
||||
if os.path.exists(TOKEN_FILE_NAME):
|
||||
os.remove(TOKEN_FILE_NAME)
|
||||
if os.path.exists(TOKEN_ENCRYPTED_NAME):
|
||||
os.remove(TOKEN_ENCRYPTED_NAME)
|
||||
YOUTUBE = get_authenticated_service()
|
||||
else:
|
||||
print('\n')
|
||||
|
||||
Reference in New Issue
Block a user