2 import xml.etree.ElementTree
4 from .common import InfoExtractor
5 from ..utils import determine_ext
8 class EbaumsWorldIE(InfoExtractor):
9 _VALID_URL = r'https?://www\.ebaumsworld\.com/video/watch/(?P<id>\d+)'
12 u'url': u'http://www.ebaumsworld.com/video/watch/83367677/',
13 u'file': u'83367677.mp4',
15 u'title': u'A Giant Python Opens The Door',
16 u'description': u'This is how nightmares start...',
17 u'uploader': u'jihadpizza',
21 def _real_extract(self, url):
22 mobj = re.match(self._VALID_URL, url)
23 video_id = mobj.group('id')
24 config_xml = self._download_webpage(
25 'http://www.ebaumsworld.com/video/player/%s' % video_id, video_id)
26 config = xml.etree.ElementTree.fromstring(config_xml.encode('utf-8'))
27 video_url = config.find('file').text
31 'title': config.find('title').text,
33 'ext': determine_ext(video_url),
34 'description': config.find('description').text,
35 'thumbnail': config.find('image').text,
36 'uploader': config.find('username').text,