1
0
Fork 0
mirror of https://github.com/blackjack4494/yt-dlc.git synced 2024-12-26 01:37:27 +00:00

[mtvservices:embedded] Improve config url (fixes #4092)

This commit is contained in:
Jaime Marquínez Ferrándiz 2014-11-14 19:02:18 +01:00
parent 5fee0eeac0
commit 71f8c7ce7a

View file

@ -186,7 +186,8 @@ class MTVServicesEmbeddedIE(MTVServicesInfoExtractor):
def _get_feed_url(self, uri): def _get_feed_url(self, uri):
video_id = self._id_from_uri(uri) video_id = self._id_from_uri(uri)
site_id = uri.replace(video_id, '') site_id = uri.replace(video_id, '')
config_url = 'http://media.mtvnservices.com/pmt/e1/players/{0}/config.xml'.format(site_id) config_url = ('http://media.mtvnservices.com/pmt/e1/players/{0}/'
'context4/context5/config.xml'.format(site_id))
config_doc = self._download_xml(config_url, video_id) config_doc = self._download_xml(config_url, video_id)
feed_node = config_doc.find('.//feed') feed_node = config_doc.find('.//feed')
feed_url = feed_node.text.strip().split('?')[0] feed_url = feed_node.text.strip().split('?')[0]