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