replace elifs
This commit is contained in:
parent
97129c6a21
commit
01b7a48bc7
1 changed files with 9 additions and 10 deletions
|
@ -108,14 +108,14 @@ class GetYoutubeVideos:
|
|||
if not result:
|
||||
return None
|
||||
return result
|
||||
elif 'HTTP Error 403: Forbidden' in f"{error}":
|
||||
if 'HTTP Error 403: Forbidden' in f"{error}":
|
||||
self.summary['videos_with_error'] += 1
|
||||
self.summary['possible_proxy_errors'] += 1
|
||||
result = self._change_proxy(video_id)
|
||||
if not result:
|
||||
return None
|
||||
return result
|
||||
elif 'not a bot' in f"{error}":
|
||||
if 'not a bot' in f"{error}":
|
||||
self.summary['videos_with_error'] += 1
|
||||
self.summary['possible_ban_errors'] += 1
|
||||
# elif age_limit_errors?
|
||||
|
@ -123,9 +123,8 @@ class GetYoutubeVideos:
|
|||
if not result:
|
||||
return None
|
||||
return result
|
||||
elif 'This live event will begin in a few moments' in f"{error}":
|
||||
self.summary['skipped_videos'] += 1
|
||||
else:
|
||||
# if 'This live event will begin in a few moments' in f"{error}":
|
||||
# self.summary['skipped_videos'] += 1
|
||||
self.summary['skipped_videos'] += 1
|
||||
self._log.debug(
|
||||
"Skipping video. Error: %s",
|
||||
|
|
Loading…
Reference in a new issue