check proxy list
This commit is contained in:
parent
6f1dced8e2
commit
ef376d4898
1 changed files with 28 additions and 20 deletions
|
@ -215,37 +215,45 @@ class GetYoutubeVideos:
|
||||||
return None
|
return None
|
||||||
return result
|
return result
|
||||||
if 'HTTP Error 403: Forbidden' in f"{error}":
|
if 'HTTP Error 403: Forbidden' in f"{error}":
|
||||||
result = self._change_proxy(video_id)
|
result = None
|
||||||
if not result:
|
if 'proxy' in self.config and len(self.config['proxy']) > 0:
|
||||||
self.summary['videos_with_error'] += 1
|
result = self._change_proxy(video_id)
|
||||||
self.summary['possible_proxy_errors'] += 1
|
if not result:
|
||||||
return None
|
self.summary['videos_with_error'] += 1
|
||||||
|
self.summary['possible_proxy_errors'] += 1
|
||||||
|
return None
|
||||||
return result
|
return result
|
||||||
if 'not a bot' in f"{error}":
|
if 'not a bot' in f"{error}":
|
||||||
# elif age_limit_errors?
|
# elif age_limit_errors?
|
||||||
result = self._change_proxy(video_id)
|
result = None
|
||||||
if not result:
|
if 'proxy' in self.config and len(self.config['proxy']) > 0:
|
||||||
self.summary['videos_with_error'] += 1
|
result = self._change_proxy(video_id)
|
||||||
self.summary['possible_ban_errors'] += 1
|
if not result:
|
||||||
return None
|
self.summary['videos_with_error'] += 1
|
||||||
|
self.summary['possible_ban_errors'] += 1
|
||||||
|
return None
|
||||||
return result
|
return result
|
||||||
if 'Failed to extract any player response' in f"{error}":
|
if 'Failed to extract any player response' in f"{error}":
|
||||||
self._log.error(
|
self._log.error(
|
||||||
"Possible error connecting to proxy '%s'",
|
"Possible error connecting to proxy '%s'",
|
||||||
self.selected_proxy
|
self.selected_proxy
|
||||||
)
|
)
|
||||||
result = self._change_proxy(video_id)
|
result = None
|
||||||
if not result:
|
if 'proxy' in self.config and len(self.config['proxy']) > 0:
|
||||||
self.summary['videos_with_error'] += 1
|
result = self._change_proxy(video_id)
|
||||||
self.summary['possible_proxy_errors'] += 1
|
if not result:
|
||||||
return None
|
self.summary['videos_with_error'] += 1
|
||||||
|
self.summary['possible_proxy_errors'] += 1
|
||||||
|
return None
|
||||||
return result
|
return result
|
||||||
if 'HTTP Error 429: Too Many Requests' in f"{error}":
|
if 'HTTP Error 429: Too Many Requests' in f"{error}":
|
||||||
result = self._change_proxy(video_id)
|
result = None
|
||||||
if not result:
|
if 'proxy' in self.config and len(self.config['proxy']) > 0:
|
||||||
self.summary['videos_with_error'] += 1
|
result = self._change_proxy(video_id)
|
||||||
self.summary['possible_proxy_errors'] += 1
|
if not result:
|
||||||
return None
|
self.summary['videos_with_error'] += 1
|
||||||
|
self.summary['possible_proxy_errors'] += 1
|
||||||
|
return None
|
||||||
return result
|
return result
|
||||||
# if 'This live event will begin in a few moments' in f"{error}":
|
# if 'This live event will begin in a few moments' in f"{error}":
|
||||||
# self.summary['skipped_videos'] += 1
|
# self.summary['skipped_videos'] += 1
|
||||||
|
|
Loading…
Reference in a new issue