aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/extractor/sportdeutschland.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2015-12-27 13:11:53 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2015-12-27 13:11:55 +0100
commit9f610f3a9e0e7536fe9c0ca167ea084aa2cd54df (patch)
tree85a7717a33782c478adab9efc19bb7c3288f0e26 /youtube_dl/extractor/sportdeutschland.py
parent46124a49b233ef443421337849c7b8ebc8c89cc2 (diff)
downloadyoutube-dl-9f610f3a9e0e7536fe9c0ca167ea084aa2cd54df.zip
youtube-dl-9f610f3a9e0e7536fe9c0ca167ea084aa2cd54df.tar.gz
youtube-dl-9f610f3a9e0e7536fe9c0ca167ea084aa2cd54df.tar.bz2
[sportdeutschland] Do not abort if meta info is missing
This fixes http://sportdeutschland.tv/badminton/yonex-copenhagen-masters-2015 . No testcase though since the event will be over by 2016.
Diffstat (limited to 'youtube_dl/extractor/sportdeutschland.py')
-rw-r--r--youtube_dl/extractor/sportdeutschland.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/extractor/sportdeutschland.py b/youtube_dl/extractor/sportdeutschland.py
index ebb75f0..a9927f6 100644
--- a/youtube_dl/extractor/sportdeutschland.py
+++ b/youtube_dl/extractor/sportdeutschland.py
@@ -70,10 +70,12 @@ class SportDeutschlandIE(InfoExtractor):
smil_doc = self._download_xml(
smil_url, video_id, note='Downloading SMIL metadata')
- base_url = smil_doc.find('./head/meta').attrib['base']
+ base_url_el = smil_doc.find('./head/meta')
+ if base_url_el:
+ base_url = base_url_el.attrib['base']
formats.extend([{
'format_id': 'rmtp',
- 'url': base_url,
+ 'url': base_url if base_url_el else n.attrib['src'],
'play_path': n.attrib['src'],
'ext': 'flv',
'preference': -100,