2 from __future__ import unicode_literals
4 from .common import InfoExtractor
11 class BildIE(InfoExtractor):
12 _VALID_URL = r'https?://(?:www\.)?bild\.de/(?:[^/]+/)+(?P<display_id>[^/]+)-(?P<id>\d+)(?:,auto=true)?\.bild\.html'
15 'url': 'http://www.bild.de/video/clip/apple-ipad-air/das-koennen-die-neuen-ipads-38184146.bild.html',
16 'md5': 'dd495cbd99f2413502a1713a1156ac8a',
20 'title': 'Das können die neuen iPads ',
21 'thumbnail': 're:^https?://.*\.jpg$',
23 'description': 'Mit dem iPad Air 2 und dem iPad Mini 3 hat Apple zwei neue Tablet-Modelle präsentiert. BILD-Reporter Sven Stein durfte die Geräte bereits testen. ',
27 def _real_extract(self, url):
28 video_id = self._match_id(url)
30 video_data = self._download_json(url.split(".bild.html")[0] + ",view=json.bild.html", video_id)
34 'title': unescapeHTML(video_data['title']),
35 'description': unescapeHTML(video_data.get('description')),
36 'url': video_data['clipList'][0]['srces'][0]['src'],
37 'thumbnail': video_data.get('poster'),
38 'duration': int_or_none(video_data.get('durationSec')),