diff options
author | Sergey M․ <dstftw@gmail.com> | 2017-07-09 19:05:18 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2017-07-09 19:17:54 +0700 |
commit | 73cf76a93fe48240bf82b1685b1403f05b793ebf (patch) | |
tree | cd06be69fe2de9533e4e295a3ba5c0d118ad3e0b /youtube_dl/extractor/generic.py | |
parent | 256a746d21634eccad07a1e6dcafedcdf8b6181b (diff) |
[joj] Rewrite and add support for generic embeds (closes #13268)
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r-- | youtube_dl/extractor/generic.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 919f4f987..f2c577f98 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -91,6 +91,7 @@ from .anvato import AnvatoIE from .washingtonpost import WashingtonPostIE from .wistia import WistiaIE from .mediaset import MediasetIE +from .joj import JojIE class GenericIE(InfoExtractor): @@ -1771,6 +1772,16 @@ class GenericIE(InfoExtractor): 'add_ie': [MediasetIE.ie_key()], }, { + # JOJ.sk embeds + 'url': 'https://www.noviny.sk/slovensko/238543-slovenskom-sa-prehnala-vlna-silnych-burok', + 'info_dict': { + 'id': '238543-slovenskom-sa-prehnala-vlna-silnych-burok', + 'title': 'Slovenskom sa prehnala vlna silných búrok', + }, + 'playlist_mincount': 5, + 'add_ie': [JojIE.ie_key()], + }, + { # AMP embed (see https://www.ampproject.org/docs/reference/components/amp-video) 'url': 'https://tvrain.ru/amp/418921/', 'md5': 'cc00413936695987e8de148b67d14f1d', @@ -2722,6 +2733,12 @@ class GenericIE(InfoExtractor): return self.playlist_from_matches( mediaset_urls, video_id, video_title, ie=MediasetIE.ie_key()) + # Look for JOJ.sk embeds + joj_urls = JojIE._extract_urls(webpage) + if joj_urls: + return self.playlist_from_matches( + joj_urls, video_id, video_title, ie=JojIE.ie_key()) + def merge_dicts(dict1, dict2): merged = {} for k, v in dict1.items(): |