diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-08-09 19:41:55 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-08-09 19:41:55 +0600 |
commit | 942acef594428b5f5c7e0ed7860cb6d725d8f1e5 (patch) | |
tree | 82e277a86e59d681307ffb9be2366ef03c268b9b | |
parent | fb2f339fec20c35cb62c1da682e0dfd418faef81 (diff) |
[extractor/common] Extract _parse_xspf
-rw-r--r-- | youtube_dl/extractor/common.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index be91e03e9..5982055be 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -1144,11 +1144,15 @@ class InfoExtractor(object): }) return subtitles - def _extract_xspf_playlist(self, playlist_url, playlist_id): - playlist = self._download_xml( + def _extract_xspf_playlist(self, playlist_url, playlist_id, fatal=True): + xspf = self._download_xml( playlist_url, playlist_id, 'Downloading xpsf playlist', - 'Unable to download xspf manifest') + 'Unable to download xspf manifest', fatal=fatal) + if xspf is False: + return [] + return self._parse_xspf(xspf, playlist_id) + def _parse_xspf(self, playlist, playlist_id): NS_MAP = { 'xspf': 'http://xspf.org/ns/0/', 's1': 'http://static.streamone.nl/player/ns/0', |