1
0
Fork 0
mirror of https://codeberg.org/polarisfm/youtube-dl.git synced 2024-12-27 18:16:44 +00:00

manually specify namespace

This commit is contained in:
Mister Hat 2015-05-17 03:35:08 -05:00
parent 725652e924
commit ba9d16291b

View file

@ -29,15 +29,13 @@ class KarriereVideosIE(InfoExtractor):
playlist = self._html_search_regex(r'/config/video/(.*?)\.xml', webpage, 'playlist') playlist = self._html_search_regex(r'/config/video/(.*?)\.xml', webpage, 'playlist')
playlist = self._download_xml( playlist = self._download_xml(
'http://www.karrierevideos.at/player-playlist.xml.php?p=%s' % playlist, 'http://www.karrierevideos.at/player-playlist.xml.php?p=' + playlist,
video_id) video_id)
namespace = { namespace = 'http://developer.longtailvideo.com/trac/wiki/FlashFormats'
'jwplayer': 'http://developer.longtailvideo.com/trac/wiki/FlashFormats'
}
item = playlist.find('tracklist/item') item = playlist.find('tracklist/item')
streamer = item.find('jwplayer:streamer', namespace).text streamer = item.find('{%s}streamer' % namespace).text
return { return {
'id': video_id, 'id': video_id,
@ -46,7 +44,7 @@ class KarriereVideosIE(InfoExtractor):
'thumbnail': 'http://www.karrierevideos.at' + self._html_search_meta('thumbnail', webpage), 'thumbnail': 'http://www.karrierevideos.at' + self._html_search_meta('thumbnail', webpage),
'protocol': 'rtmp', 'protocol': 'rtmp',
'url': streamer.replace('rtmpt', 'http'), 'url': streamer.replace('rtmpt', 'http'),
'play_path': 'mp4:' + item.find('jwplayer:file', namespace).text, 'play_path': 'mp4:' + item.find('{%s}file' % namespace).text,
'tc_url': streamer, 'tc_url': streamer,
'ext': 'mp4' 'ext': 'mp4'
} }