diff options
author | nixxo <c.nixxo@gmail.com> | 2020-10-28 13:48:22 +0100 |
---|---|---|
committer | nixxo <c.nixxo@gmail.com> | 2020-10-28 13:48:22 +0100 |
commit | 6c6ee4905f386f4280d9c07de50eafd3a797c306 (patch) | |
tree | 249a75a13df265b9ee110580c4fe9d1404bdbda2 | |
parent | 079a941282648b0278933e57adc4a77c3e95b86e (diff) | |
download | hypervideo-pre-6c6ee4905f386f4280d9c07de50eafd3a797c306.tar.lz hypervideo-pre-6c6ee4905f386f4280d9c07de50eafd3a797c306.tar.xz hypervideo-pre-6c6ee4905f386f4280d9c07de50eafd3a797c306.zip |
[mtv] proposed fix
-rw-r--r-- | youtube_dlc/extractor/mtv.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube_dlc/extractor/mtv.py b/youtube_dlc/extractor/mtv.py index feb442377..04cc95b6a 100644 --- a/youtube_dlc/extractor/mtv.py +++ b/youtube_dlc/extractor/mtv.py @@ -289,7 +289,7 @@ class MTVServicesInfoExtractor(InfoExtractor): return mgid - def _extract_mgid(self, webpage, url, data_zone=None): + def _extract_mgid(self, webpage, url, title=None, data_zone=None): try: # the url can be http://media.mtvnservices.com/fb/{mgid}.swf # or http://media.mtvnservices.com/{mgid} @@ -300,8 +300,8 @@ class MTVServicesInfoExtractor(InfoExtractor): except RegexNotFoundError: mgid = None - # TODO: ideally use self._match_id(url) - title = url_basename(url) + if not title: + title = url_basename(url) try: window_data = self._parse_json(self._search_regex( @@ -337,7 +337,7 @@ class MTVServicesInfoExtractor(InfoExtractor): def _real_extract(self, url): title = url_basename(url) webpage = self._download_webpage(url, title) - mgid = self._extract_mgid(webpage, url) + mgid = self._extract_mgid(webpage, url, title=title) videos_info = self._get_videos_info(mgid, url=url) return videos_info |