X-Git-Url: https://git.rapsys.eu/youtubedl/blobdiff_plain/15b1d10671b48df598afd70e17ba21e9e64ac766..620b803afb94df95e3761acf1e764a9eb3a4b00c:/youtube_dl/extractor/mtv.py?ds=sidebyside diff --git a/youtube_dl/extractor/mtv.py b/youtube_dl/extractor/mtv.py index b482d6d..bc7f49e 100644 --- a/youtube_dl/extractor/mtv.py +++ b/youtube_dl/extractor/mtv.py @@ -2,10 +2,13 @@ from __future__ import unicode_literals import re -from .common import InfoExtractor -from ..utils import ( +from .subtitles import SubtitlesInfoExtractor +from ..compat import ( compat_urllib_parse, compat_urllib_request, + compat_str, +) +from ..utils import ( ExtractorError, find_xpath_attr, fix_xml_ampersands, @@ -20,7 +23,7 @@ def _media_xml_tag(tag): return '{http://search.yahoo.com/mrss/}%s' % tag -class MTVServicesInfoExtractor(InfoExtractor): +class MTVServicesInfoExtractor(SubtitlesInfoExtractor): _MOBILE_TEMPLATE = None @staticmethod @@ -51,7 +54,7 @@ class MTVServicesInfoExtractor(InfoExtractor): webpage_url = self._MOBILE_TEMPLATE % mtvn_id req = compat_urllib_request.Request(webpage_url) # Otherwise we get a webpage that would execute some javascript - req.add_header('Youtubedl-user-agent', 'curl/7') + req.add_header('User-Agent', 'curl/7') webpage = self._download_webpage(req, mtvn_id, 'Downloading mobile page') metrics_url = unescapeHTML(self._search_regex(r'