diff options
author | Sergey M․ <dstftw@gmail.com> | 2018-11-16 22:55:35 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2018-11-16 22:55:35 +0700 |
commit | 9b9b3501c5bee18d608dd2961a80936667f8ece2 (patch) | |
tree | 8dcf226aa39e28fc898e53f1b7c6a0055af4ba52 /youtube_dl/extractor/tnaflix.py | |
parent | 730c0d12a06f349907481570f1f2890251f7a181 (diff) |
[tnaflixnetwork:embed] Fix extraction (closes #18205)
Diffstat (limited to 'youtube_dl/extractor/tnaflix.py')
-rw-r--r-- | youtube_dl/extractor/tnaflix.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/youtube_dl/extractor/tnaflix.py b/youtube_dl/extractor/tnaflix.py index 0c2f8f119..6798ef4c3 100644 --- a/youtube_dl/extractor/tnaflix.py +++ b/youtube_dl/extractor/tnaflix.py @@ -18,8 +18,9 @@ from ..utils import ( class TNAFlixNetworkBaseIE(InfoExtractor): # May be overridden in descendants if necessary _CONFIG_REGEX = [ - r'flashvars\.config\s*=\s*escape\("([^"]+)"', - r'<input[^>]+name="config\d?" value="([^"]+)"', + r'flashvars\.config\s*=\s*escape\("(?P<url>[^"]+)"', + r'<input[^>]+name="config\d?" value="(?P<url>[^"]+)"', + r'config\s*=\s*(["\'])(?P<url>(?:https?:)?//(?:(?!\1).)+)\1', ] _HOST = 'tna' _VKEY_SUFFIX = '' @@ -85,7 +86,8 @@ class TNAFlixNetworkBaseIE(InfoExtractor): webpage = self._download_webpage(url, display_id) cfg_url = self._proto_relative_url(self._html_search_regex( - self._CONFIG_REGEX, webpage, 'flashvars.config', default=None), 'http:') + self._CONFIG_REGEX, webpage, 'flashvars.config', default=None, + group='url'), 'http:') if not cfg_url: inputs = self._hidden_inputs(webpage) |