[nerdist] Add new extractor (Fixes #4851)

This commit is contained in:
Philipp Hagemeister 2015-02-02 23:38:35 +01:00
parent 531572578e
commit 995029a142
3 changed files with 86 additions and 2 deletions

View file

@ -860,10 +860,13 @@ class InfoExtractor(object):
return formats
# TODO: improve extraction
def _extract_smil_formats(self, smil_url, video_id):
def _extract_smil_formats(self, smil_url, video_id, fatal=True):
smil = self._download_xml(
smil_url, video_id, 'Downloading SMIL file',
'Unable to download SMIL file')
'Unable to download SMIL file', fatal=fatal)
if smil is False:
assert not fatal
return []
base = smil.find('./head/meta').get('base')