]> jfr.im git - yt-dlp.git/blame - yt_dlp/extractor/ebaumsworld.py
Completely change project name to yt-dlp (#85)
[yt-dlp.git] / yt_dlp / extractor / ebaumsworld.py
CommitLineData
cf0c5fa3
PH
1from __future__ import unicode_literals
2
3d60bb96 3from .common import InfoExtractor
3d60bb96
JMF
4
5
6class EbaumsWorldIE(InfoExtractor):
443285aa 7 _VALID_URL = r'https?://(?:www\.)?ebaumsworld\.com/videos/[^/]+/(?P<id>\d+)'
3d60bb96
JMF
8
9 _TEST = {
443285aa 10 'url': 'http://www.ebaumsworld.com/videos/a-giant-python-opens-the-door/83367677/',
cf0c5fa3
PH
11 'info_dict': {
12 'id': '83367677',
13 'ext': 'mp4',
14 'title': 'A Giant Python Opens The Door',
15 'description': 'This is how nightmares start...',
16 'uploader': 'jihadpizza',
3d60bb96
JMF
17 },
18 }
19
20 def _real_extract(self, url):
57e086dc 21 video_id = self._match_id(url)
e26f8712 22 config = self._download_xml(
3d60bb96 23 'http://www.ebaumsworld.com/video/player/%s' % video_id, video_id)
3d60bb96
JMF
24 video_url = config.find('file').text
25
26 return {
27 'id': video_id,
28 'title': config.find('title').text,
29 'url': video_url,
3d60bb96
JMF
30 'description': config.find('description').text,
31 'thumbnail': config.find('image').text,
32 'uploader': config.find('username').text,
33 }