]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/puls4.py
1 from .prosiebensat1
import ProSiebenSat1BaseIE
2 from ..compat
import compat_str
3 from ..utils
import parse_duration
, unified_strdate
6 class Puls4IE(ProSiebenSat1BaseIE
):
7 _VALID_URL
= r
'https?://(?:www\.)?puls4\.com/(?P<id>[^?#&]+)'
9 'url': 'http://www.puls4.com/2-minuten-2-millionen/staffel-3/videos/2min2miotalk/Tobias-Homberger-von-myclubs-im-2min2miotalk-118118',
10 'md5': 'fd3c6b0903ac72c9d004f04bc6bb3e03',
14 'title': 'Tobias Homberger von myclubs im #2min2miotalk',
15 'description': 'md5:f9def7c5e8745d6026d8885487d91955',
16 'upload_date': '20160830',
20 'url': 'http://www.puls4.com/pro-und-contra/wer-wird-prasident/Ganze-Folgen/Wer-wird-Praesident.-Norbert-Hofer',
21 'only_matching': True,
23 'url': 'http://www.puls4.com/pro-und-contra/wer-wird-prasident/Ganze-Folgen/Wer-wird-Praesident-Analyse-des-Interviews-mit-Norbert-Hofer-416598',
24 'only_matching': True,
27 _SALT
= '01!kaNgaiNgah1Ie4AeSha'
30 def _real_extract(self
, url
):
31 path
= self
._match
_id
(url
)
32 content_path
= self
._download
_json
(
33 'http://www.puls4.com/api/json-fe/page/' + path
, path
)['content'][0]['url']
34 media
= self
._download
_json
(
35 'http://www.puls4.com' + content_path
,
36 content_path
)['mediaCurrent']
37 player_content
= media
['playerContent']
38 info
= self
._extract
_video
_info
(url
, player_content
['id'])
40 'id': compat_str(media
['objectId']),
41 'title': player_content
['title'],
42 'description': media
.get('description'),
43 'thumbnail': media
.get('previewLink'),
44 'upload_date': unified_strdate(media
.get('date')),
45 'duration': parse_duration(player_content
.get('duration')),
46 'episode': player_content
.get('episodePartName'),
47 'show': media
.get('channel'),
48 'season_id': player_content
.get('seasonId'),
49 'uploader': player_content
.get('sourceCompany'),