[ytdl] update 'parse_bytes' location (#3256)

https://github.com/yt-dlp/yt-dlp/commit/64c464a
This commit is contained in:
Mike Fährmann
2022-11-19 11:43:58 +01:00
parent 226d778294
commit 985fd398f5

View File

@@ -73,7 +73,11 @@ def parse_command_line(module, argv):
ytdlp = (module.__name__ == "yt_dlp")
std_headers = module.std_headers
parse_bytes = module.FileDownloader.parse_bytes
try:
parse_bytes = module.parse_bytes
except AttributeError:
parse_bytes = module.FileDownloader.parse_bytes
# HTTP headers
if opts.user_agent is not None: