mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[extractor/common] Extract _parse_xspf
This commit is contained in:
parent
fb2f339fec
commit
942acef594
1 changed files with 7 additions and 3 deletions
|
@ -1144,11 +1144,15 @@ def _parse_smil_subtitles(self, smil, namespace=None):
|
||||||
})
|
})
|
||||||
return subtitles
|
return subtitles
|
||||||
|
|
||||||
def _extract_xspf_playlist(self, playlist_url, playlist_id):
|
def _extract_xspf_playlist(self, playlist_url, playlist_id, fatal=True):
|
||||||
playlist = self._download_xml(
|
xspf = self._download_xml(
|
||||||
playlist_url, playlist_id, 'Downloading xpsf playlist',
|
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 = {
|
NS_MAP = {
|
||||||
'xspf': 'http://xspf.org/ns/0/',
|
'xspf': 'http://xspf.org/ns/0/',
|
||||||
's1': 'http://static.streamone.nl/player/ns/0',
|
's1': 'http://static.streamone.nl/player/ns/0',
|
||||||
|
|
Loading…
Reference in a new issue