]> jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/ebaumsworld.py
[ie/orf:on] Improve extraction (#9677)
[yt-dlp.git] / yt_dlp / extractor / ebaumsworld.py
1 from .common import InfoExtractor
2
3
4 class EbaumsWorldIE(InfoExtractor):
5 _VALID_URL = r'https?://(?:www\.)?ebaumsworld\.com/videos/[^/]+/(?P<id>\d+)'
6
7 _TEST = {
8 'url': 'http://www.ebaumsworld.com/videos/a-giant-python-opens-the-door/83367677/',
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',
15 },
16 }
17
18 def _real_extract(self, url):
19 video_id = self._match_id(url)
20 config = self._download_xml(
21 'http://www.ebaumsworld.com/video/player/%s' % video_id, video_id)
22 video_url = config.find('file').text
23
24 return {
25 'id': video_id,
26 'title': config.find('title').text,
27 'url': video_url,
28 'description': config.find('description').text,
29 'thumbnail': config.find('image').text,
30 'uploader': config.find('username').text,
31 }