check proxy list

This commit is contained in:
Antonio J. Delgado 2025-09-15 10:36:28 +03:00
parent 6f1dced8e2
commit ef376d4898

View file

@ -215,6 +215,8 @@ class GetYoutubeVideos:
return None
return result
if 'HTTP Error 403: Forbidden' in f"{error}":
result = None
if 'proxy' in self.config and len(self.config['proxy']) > 0:
result = self._change_proxy(video_id)
if not result:
self.summary['videos_with_error'] += 1
@ -223,6 +225,8 @@ class GetYoutubeVideos:
return result
if 'not a bot' in f"{error}":
# elif age_limit_errors?
result = None
if 'proxy' in self.config and len(self.config['proxy']) > 0:
result = self._change_proxy(video_id)
if not result:
self.summary['videos_with_error'] += 1
@ -234,6 +238,8 @@ class GetYoutubeVideos:
"Possible error connecting to proxy '%s'",
self.selected_proxy
)
result = None
if 'proxy' in self.config and len(self.config['proxy']) > 0:
result = self._change_proxy(video_id)
if not result:
self.summary['videos_with_error'] += 1
@ -241,6 +247,8 @@ class GetYoutubeVideos:
return None
return result
if 'HTTP Error 429: Too Many Requests' in f"{error}":
result = None
if 'proxy' in self.config and len(self.config['proxy']) > 0:
result = self._change_proxy(video_id)
if not result:
self.summary['videos_with_error'] += 1