From 21c563f0bdc6cedaa72fba177654615ade253c75 Mon Sep 17 00:00:00 2001 From: Argn0 Date: Thu, 29 Jun 2017 01:07:28 +0200 Subject: [PATCH] catch No AssetType/Format Matches error this still raises error for example for "This content is not available in your location." --- youtube_dl/extractor/cbs.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/cbs.py b/youtube_dl/extractor/cbs.py index 1268e38ef..759b3d7de 100644 --- a/youtube_dl/extractor/cbs.py +++ b/youtube_dl/extractor/cbs.py @@ -74,9 +74,14 @@ class CBSIE(CBSBaseIE): query['formats'] = 'MPEG4,M3U' elif asset_type in ('RTMP', 'WIFI', '3G'): query['formats'] = 'MPEG4,FLV' - tp_formats, tp_subtitles = self._extract_theplatform_smil( - update_url_query(tp_release_url, query), content_id, - 'Downloading %s SMIL data' % asset_type) + try: + tp_formats, tp_subtitles = self._extract_theplatform_smil( + update_url_query(tp_release_url, query), content_id, + 'Downloading %s SMIL data' % asset_type) + except ExtractorError: + if self.errorattrib_title.startswith('No AssetType'): + continue + raise formats.extend(tp_formats) subtitles = self._merge_subtitles(subtitles, tp_subtitles) self._sort_formats(formats)