catch No AssetType/Format Matches error

This commit is contained in:
Argn0 2017-06-28 22:16:19 +02:00 committed by GitHub
parent 63d6944ad3
commit 205b63d9fd

View File

@ -37,10 +37,14 @@ class ThePlatformBaseIE(OnceIE):
smil_url, video_id, note=note, query={'format': 'SMIL'},
headers=self.geo_verification_headers())
error_element = find_xpath_attr(meta, _x('.//smil:ref'), 'src')
try:
if error_element is not None and error_element.attrib['src'].startswith(
'http://link.theplatform.com/s/errorFiles/Unavailable.') and not error_element.attrib[
'title'].startswith('No AssetType'):
'http://link.theplatform.com/s/errorFiles/Unavailable.'):
raise ExtractorError(error_element.attrib['abstract'], expected=True)
except ExtractorError:
if error_element.attrib['title'].startswith('No AssetType'):
return [], {}
raise
smil_formats = self._parse_smil_formats(
meta, smil_url, video_id, namespace=default_ns,