diff options
author | pukkandan <pukkandan@gmail.com> | 2021-02-23 02:15:51 +0530 |
---|---|---|
committer | pukkandan <pukkandan@gmail.com> | 2021-02-23 02:31:55 +0530 |
commit | 389e2956a7e95799e27e48142c5024897c8560c3 (patch) | |
tree | 7ef58791ee0a61fe7ca5686a4115e7e092d6e200 /youtube_dlc/extractor/jwplatform.py | |
parent | da6dcbad7dc6489ab9d8532c2df05d8370d58bf4 (diff) | |
download | hypervideo-pre-389e2956a7e95799e27e48142c5024897c8560c3.tar.lz hypervideo-pre-389e2956a7e95799e27e48142c5024897c8560c3.tar.xz hypervideo-pre-389e2956a7e95799e27e48142c5024897c8560c3.zip |
[jwplatform] Add support for `hyland.com`
Related: https://github.com/ytdl-org/youtube-dl/issues/12918
:ci skip dl
Diffstat (limited to 'youtube_dlc/extractor/jwplatform.py')
-rw-r--r-- | youtube_dlc/extractor/jwplatform.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/youtube_dlc/extractor/jwplatform.py b/youtube_dlc/extractor/jwplatform.py index c34b5f5e6..5aa508bf9 100644 --- a/youtube_dlc/extractor/jwplatform.py +++ b/youtube_dlc/extractor/jwplatform.py @@ -32,9 +32,14 @@ class JWPlatformIE(InfoExtractor): @staticmethod def _extract_urls(webpage): - return re.findall( - r'<(?:script|iframe)[^>]+?src=["\']((?:https?:)?//(?:content\.jwplatform|cdn\.jwplayer)\.com/players/[a-zA-Z0-9]{8})', - webpage) + for tag, key in ((r'(?:script|iframe)', 'src'), ('input', 'value')): + # <input value=URL> is used by hyland.com + # if we find <iframe>, dont look for <input> + ret = re.findall( + r'<%s[^>]+?%s=["\']((?:https?:)?//(?:content\.jwplatform|cdn\.jwplayer)\.com/players/[a-zA-Z0-9]{8})' % (tag, key), + webpage) + if ret: + return ret def _real_extract(self, url): url, smuggled_data = unsmuggle_url(url, {}) |