aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dlc/extractor/embedly.py
diff options
context:
space:
mode:
authorUnknown <blackjack4494@web.de>2020-09-02 20:25:25 +0200
committerUnknown <blackjack4494@web.de>2020-09-02 20:25:25 +0200
commitcefecac12cd3c70f9c7a30992c60b05c2eb5d34e (patch)
treef7b8e3f8ca2f6e402c83a501f72c09854ae04887 /youtube_dlc/extractor/embedly.py
parent9688f237163b6aa546fde00bb3fd1e3445dd4c31 (diff)
downloadhypervideo-pre-cefecac12cd3c70f9c7a30992c60b05c2eb5d34e.tar.lz
hypervideo-pre-cefecac12cd3c70f9c7a30992c60b05c2eb5d34e.tar.xz
hypervideo-pre-cefecac12cd3c70f9c7a30992c60b05c2eb5d34e.zip
[skip travis] renaming
to avoid using same folder when using pip install for example
Diffstat (limited to 'youtube_dlc/extractor/embedly.py')
-rw-r--r--youtube_dlc/extractor/embedly.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/youtube_dlc/extractor/embedly.py b/youtube_dlc/extractor/embedly.py
new file mode 100644
index 000000000..a5820b21e
--- /dev/null
+++ b/youtube_dlc/extractor/embedly.py
@@ -0,0 +1,16 @@
+# coding: utf-8
+from __future__ import unicode_literals
+
+from .common import InfoExtractor
+from ..compat import compat_urllib_parse_unquote
+
+
+class EmbedlyIE(InfoExtractor):
+ _VALID_URL = r'https?://(?:www|cdn\.)?embedly\.com/widgets/media\.html\?(?:[^#]*?&)?url=(?P<id>[^#&]+)'
+ _TESTS = [{
+ 'url': 'https://cdn.embedly.com/widgets/media.html?src=http%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DUUGLim4T2loE5rwCMdpCIPVg&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DSU4fj_aEMVw%26list%3DUUGLim4T2loE5rwCMdpCIPVg&image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FSU4fj_aEMVw%2Fhqdefault.jpg&key=8ee8a2e6a8cc47aab1a5ee67f9a178e0&type=text%2Fhtml&schema=youtube&autoplay=1',
+ 'only_matching': True,
+ }]
+
+ def _real_extract(self, url):
+ return self.url_result(compat_urllib_parse_unquote(self._match_id(url)))