From a1662c90ddc2f0dde1d4dda921e2ed3ce2987301 Mon Sep 17 00:00:00 2001 From: YG Date: Sun, 14 Jul 2019 02:22:50 -0400 Subject: [PATCH] capturing host --- youtube_dl/extractor/einthusan.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/einthusan.py b/youtube_dl/extractor/einthusan.py index 8e1939f4b..750fd06dd 100644 --- a/youtube_dl/extractor/einthusan.py +++ b/youtube_dl/extractor/einthusan.py @@ -19,7 +19,7 @@ from ..utils import ( class EinthusanIE(InfoExtractor): - _VALID_URL = r'https?://einthusan\.(?Ptv|com)/movie/watch/(?P[^/?#&]+)' + _VALID_URL = r'https?://(?Peinthusan\.(tv|com))/movie/watch/(?P[^/?#&]+)' _TESTS = [{ 'url': 'https://einthusan.tv/movie/watch/9097/', 'md5': 'ff0f7f2065031b8a2cf13a933731c035', @@ -43,7 +43,7 @@ class EinthusanIE(InfoExtractor): def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) - tld = mobj.group('tld') + host = mobj.group('host') video_id = mobj.group('id') webpage = self._download_webpage(url, video_id) @@ -56,7 +56,7 @@ class EinthusanIE(InfoExtractor): page_id = self._html_search_regex( ']+data-pageid="([^"]+)"', webpage, 'page ID') video_data = self._download_json( - 'https://einthusan.%s/ajax/movie/watch/%s/' % (tld, video_id), video_id, + 'https://%s/ajax/movie/watch/%s/' % (host, video_id), video_id, data=urlencode_postdata({ 'xEvent': 'UIVideoPlayer.PingOutcome', 'xJson': json.dumps({