aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dlc/extractor/mtv.py
diff options
context:
space:
mode:
authorTom-Oliver Heidel <github@tom-oliver.eu>2020-10-31 09:35:00 +0100
committerGitHub <noreply@github.com>2020-10-31 09:35:00 +0100
commitcf37b9f875037f03a63b51ec88c9a2eac6e868d9 (patch)
tree42e89884cf0b057775b10275eacb87d5f7b3d83b /youtube_dlc/extractor/mtv.py
parent587ceadc8f19aa3c0846d8ee9974e0e3e264e268 (diff)
parent7fb5f2f29d99fa269988c6586558c7e9d21e432d (diff)
downloadhypervideo-pre-cf37b9f875037f03a63b51ec88c9a2eac6e868d9.tar.lz
hypervideo-pre-cf37b9f875037f03a63b51ec88c9a2eac6e868d9.tar.xz
hypervideo-pre-cf37b9f875037f03a63b51ec88c9a2eac6e868d9.zip
Merge pull request #74 from blackjack4494/master
Release 2020.10.31
Diffstat (limited to 'youtube_dlc/extractor/mtv.py')
-rw-r--r--youtube_dlc/extractor/mtv.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/youtube_dlc/extractor/mtv.py b/youtube_dlc/extractor/mtv.py
index 6b3658397..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,7 +300,8 @@ class MTVServicesInfoExtractor(InfoExtractor):
except RegexNotFoundError:
mgid = None
- title = self._match_id(url)
+ if not title:
+ title = url_basename(url)
try:
window_data = self._parse_json(self._search_regex(
@@ -336,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