Made my changes compliant to conventions

I used flake8 to make my code compliant to conventions used in the
project, and the community.
This commit is contained in:
Youssef Hajjioui 2022-01-29 19:38:32 -05:00
commit a394706c83
4 changed files with 6 additions and 4 deletions

View file

@ -113,6 +113,7 @@ from .version import __version__
if compat_os_name == 'nt':
import ctypes
class YoutubeDL(object):
"""YoutubeDL class.
@ -824,7 +825,7 @@ class YoutubeDL(object):
self.report_error(compat_str(e), e.format_traceback())
except MaxDownloadsReached:
raise
except Forbidden403 as err:
except Forbidden403:
# Lets not abuse of this 😜 we don't want to get brutal on the server
time.sleep(random.randint(3, 13))
wrapper(self, *args, **kwargs)

View file

@ -481,5 +481,4 @@ def main(argv=None):
sys.exit('\nERROR: Interrupted by user')
__all__ = ['main', 'YoutubeDL', 'gen_extractors', 'list_extractors']

View file

@ -2997,10 +2997,12 @@ else:
def compat_ctypes_WINFUNCTYPE(*args, **kwargs):
return ctypes.WINFUNCTYPE(*args, **kwargs)
# Implement an error for which it is raise when error code 403 HTTPError
class Forbidden403(Exception):
pass
__all__ = [
'compat_HTMLParseError',
'compat_HTMLParser',