2 from __future__ import unicode_literals
4 from .common import InfoExtractor
7 import xml.etree.ElementTree as ET
11 class DHMIE(InfoExtractor):
12 _VALID_URL = r'http://www\.dhm\.de/filmarchiv/(?P<id>.*?)'
15 'url': 'http://www.dhm.de/filmarchiv/die-filme/the-marshallplan-at-work-in-west-germany/',
16 'md5': '11c475f670209bf6acca0b2b7ef51827',
20 'title': 'MARSHALL PLAN AT WORK IN WESTERN GERMANY, THE',
21 'thumbnail': 'http://www.dhm.de/filmarchiv/video/mpworkwg.jpg',
25 def _real_extract(self, url):
27 webpage = self._download_webpage(url, video_id)
29 title = self._html_search_regex(
30 r'dc:title=\"(.*?)\"', webpage, 'title')
32 playlist_url = self._html_search_regex(
33 r'file: \'(.*?)\'', webpage, 'playlist URL')
35 xml_file = urllib2.urlopen(playlist_url)
36 data = xml_file.read()
39 root = ET.fromstring(data)
40 video_url = root[0][0][0].text
41 thumbnail = root[0][0][2].text
43 m = re.search('video/(.+?).flv', video_url)
51 'thumbnail': thumbnail,