aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dlc/extractor/mailru.py
diff options
context:
space:
mode:
authorDiego Fernando Rodríguez Varón <diegorodriguezv@gmail.com>2020-11-14 09:40:51 -0500
committerDiego Fernando Rodríguez Varón <diegorodriguezv@gmail.com>2020-11-14 09:40:51 -0500
commita2044d57ca89a463a731febd5e95033c36427ab6 (patch)
tree10a57e386d3bcc6382a813bcbe785eed08fed0eb /youtube_dlc/extractor/mailru.py
parentfff50711120b1a1c0477550748768d1e5b1fb755 (diff)
parentd052b9a112fb7ae749a829dceba6e3289663a303 (diff)
downloadhypervideo-pre-a2044d57ca89a463a731febd5e95033c36427ab6.tar.lz
hypervideo-pre-a2044d57ca89a463a731febd5e95033c36427ab6.tar.xz
hypervideo-pre-a2044d57ca89a463a731febd5e95033c36427ab6.zip
Merge branch 'master' of https://github.com/blackjack4494/yt-dlc into fix-tmz
Diffstat (limited to 'youtube_dlc/extractor/mailru.py')
-rw-r--r--youtube_dlc/extractor/mailru.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/youtube_dlc/extractor/mailru.py b/youtube_dlc/extractor/mailru.py
index 6fdf70aa6..5bfe40649 100644
--- a/youtube_dlc/extractor/mailru.py
+++ b/youtube_dlc/extractor/mailru.py
@@ -12,6 +12,7 @@ from ..utils import (
parse_duration,
remove_end,
try_get,
+ urljoin,
)
@@ -93,6 +94,14 @@ class MailRuIE(InfoExtractor):
{
'url': 'https://my.mail.ru//list//sinyutin10/video/_myvideo/4.html',
'only_matching': True,
+ },
+ {
+ 'url': 'https://my.mail.ru/mail/cloud-strife/video/embed/Games/2009',
+ 'only_matching': True,
+ },
+ {
+ 'url': 'https://videoapi.my.mail.ru/videos/embed/mail/cloud-strife/Games/2009.html',
+ 'only_matching': True,
}
]
@@ -110,7 +119,7 @@ class MailRuIE(InfoExtractor):
webpage = self._download_webpage(url, video_id)
page_config = self._parse_json(self._search_regex([
r'(?s)<script[^>]+class="sp-video__page-config"[^>]*>(.+?)</script>',
- r'(?s)"video":\s*(\{.+?\}),'],
+ r'(?s)"video":\s*({.+?}),'],
webpage, 'page config', default='{}'), video_id, fatal=False)
if page_config:
meta_url = page_config.get('metaUrl') or page_config.get('video', {}).get('metaUrl') or page_config.get('metadataUrl')
@@ -121,7 +130,7 @@ class MailRuIE(InfoExtractor):
# fix meta_url if missing the host address
if re.match(r'^\/\+\/', meta_url):
- meta_url = 'https://my.mail.ru' + meta_url
+ meta_url = urljoin('https://my.mail.ru', meta_url)
if meta_url:
video_data = self._download_json(