]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/faz.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
7 class FazIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://www\.faz\.net/multimedia/videos/.*?-(?P<id>\d+)\.html'
12 'url': 'http://www.faz.net/multimedia/videos/stockholm-chemie-nobelpreis-fuer-drei-amerikanische-forscher-12610585.html',
16 'title': 'Stockholm: Chemie-Nobelpreis für drei amerikanische Forscher',
17 'description': 'md5:1453fbf9a0d041d985a47306192ea253',
21 def _real_extract(self
, url
):
22 video_id
= self
._match
_id
(url
)
24 webpage
= self
._download
_webpage
(url
, video_id
)
25 config_xml_url
= self
._search
_regex
(
26 r
'writeFLV\(\'(.+?
)\',', webpage, 'config xml url
')
27 config = self._download_xml(
28 config_xml_url, video_id, 'Downloading config xml
')
30 encodings = config.find('ENCODINGS
')
32 for pref, code in enumerate(['LOW
', 'HIGH
', 'HQ
']):
33 encoding = encodings.find(code)
36 encoding_url = encoding.find('FILENAME
').text
39 'format_id
': code.lower(),
42 self._sort_formats(formats)
44 descr = self._html_search_regex(
45 r'<p
class="Content Copy">(.*?
)</p
>', webpage, 'description
', fatal=False)
48 'title
': self._og_search_title(webpage),
51 'thumbnail
': config.find('STILL
/STILL_BIG
').text,