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