From a6d3b89febce9450b10cb379568d77895103c998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Wed, 6 Jul 2016 00:52:48 +0700 Subject: [PATCH] [prosiebensat1] Make downloading urls JSON non fatal --- youtube_dl/extractor/prosiebensat1.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/prosiebensat1.py b/youtube_dl/extractor/prosiebensat1.py index ad0f0031cf..c6eee3b72a 100644 --- a/youtube_dl/extractor/prosiebensat1.py +++ b/youtube_dl/extractor/prosiebensat1.py @@ -280,7 +280,7 @@ def fix_bitrate(bitrate): client_id = g[:2] + sha1(''.join([g, clip_id, access_token, server_id, client_location, source_id, g, client_name]).encode('utf-8')).hexdigest() urls = self._download_json( 'http://vas.sim-technik.de/vas/live/v2/videos/%s/sources/url' % clip_id, - clip_id, 'Downloading urls JSON', query={ + clip_id, 'Downloading urls JSON', fatal=False, query={ 'access_token': access_token, 'client_id': client_id, 'client_location': client_location, @@ -288,6 +288,8 @@ def fix_bitrate(bitrate): 'server_id': server_id, 'source_ids': source_id, }) + if not urls: + continue if urls.get('status_code') != 0: raise ExtractorError('This video is unavailable', expected=True) urls_sources = urls['sources']