From 756f31a50bbaacaca71206f9d88726a17b0038f0 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Mon, 4 Feb 2019 20:08:54 -0800 Subject: [PATCH] hide common youtubedl failures --- archivebox/archive_methods.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/archivebox/archive_methods.py b/archivebox/archive_methods.py index ad0cbdc8..857019a4 100644 --- a/archivebox/archive_methods.py +++ b/archivebox/archive_methods.py @@ -528,7 +528,10 @@ def fetch_media(link_dir, link, timeout=MEDIA_TIMEOUT, overwrite=False): result = run(CMD, stdout=PIPE, stderr=PIPE, cwd=output, timeout=timeout + 1) # audio/audio.mp3 end() if result.returncode: - if b'ERROR: Unsupported URL' in result.stderr or b'HTTP Error 404' in result.stderr: + if (b'ERROR: Unsupported URL' in result.stderr + or b'HTTP Error 404' in result.stderr + or b'HTTP Error 403' in result.stderr + or b'URL could be a direct video link' in result.stderr): pass else: print(' got youtubedl response code {}:'.format(result.returncode))