check proxy list
This commit is contained in:
parent
6f1dced8e2
commit
ef376d4898
1 changed files with 28 additions and 20 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue