aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/ebaumsworld.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-06-09 17:54:27 -0500
committerJesús <heckyel@hyperbola.info>2021-06-09 17:54:27 -0500
commit27fe903c511691c078942bef5ee9a05a43b15c8f (patch)
tree50f30ab2ec749b965869518c0a28651f8677f0d3 /hypervideo_dl/extractor/ebaumsworld.py
downloadhypervideo-27fe903c511691c078942bef5ee9a05a43b15c8f.tar.lz
hypervideo-27fe903c511691c078942bef5ee9a05a43b15c8f.tar.xz
hypervideo-27fe903c511691c078942bef5ee9a05a43b15c8f.zip
initial
Diffstat (limited to 'hypervideo_dl/extractor/ebaumsworld.py')
-rw-r--r--hypervideo_dl/extractor/ebaumsworld.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/hypervideo_dl/extractor/ebaumsworld.py b/hypervideo_dl/extractor/ebaumsworld.py
new file mode 100644
index 0000000..c97682c
--- /dev/null
+++ b/hypervideo_dl/extractor/ebaumsworld.py
@@ -0,0 +1,33 @@
+from __future__ import unicode_literals
+
+from .common import InfoExtractor
+
+
+class EbaumsWorldIE(InfoExtractor):
+ _VALID_URL = r'https?://(?:www\.)?ebaumsworld\.com/videos/[^/]+/(?P<id>\d+)'
+
+ _TEST = {
+ 'url': 'http://www.ebaumsworld.com/videos/a-giant-python-opens-the-door/83367677/',
+ 'info_dict': {
+ 'id': '83367677',
+ 'ext': 'mp4',
+ 'title': 'A Giant Python Opens The Door',
+ 'description': 'This is how nightmares start...',
+ 'uploader': 'jihadpizza',
+ },
+ }
+
+ def _real_extract(self, url):
+ video_id = self._match_id(url)
+ config = self._download_xml(
+ 'http://www.ebaumsworld.com/video/player/%s' % video_id, video_id)
+ video_url = config.find('file').text
+
+ return {
+ 'id': video_id,
+ 'title': config.find('title').text,
+ 'url': video_url,
+ 'description': config.find('description').text,
+ 'thumbnail': config.find('image').text,
+ 'uploader': config.find('username').text,
+ }