]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/dctp.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
5 from ..compat
import compat_str
12 class DctpTvIE(InfoExtractor
):
13 _VALID_URL
= r
'https?://(?:www\.)?dctp\.tv/(?:#/)?filme/(?P<id>[^/?#&]+)'
15 'url': 'http://www.dctp.tv/filme/videoinstallation-fuer-eine-kaufhausfassade/',
17 'id': '95eaa4f33dad413aa17b4ee613cccc6c',
18 'display_id': 'videoinstallation-fuer-eine-kaufhausfassade',
20 'title': 'Videoinstallation für eine Kaufhausfassade',
21 'description': 'Kurzfilm',
22 'upload_date': '20110407',
23 'thumbnail': r
're:^https?://.*\.jpg$',
28 'skip_download': True,
32 def _real_extract(self
, url
):
33 display_id
= self
._match
_id
(url
)
35 webpage
= self
._download
_webpage
(url
, display_id
)
37 video_id
= self
._html
_search
_meta
(
38 'DC.identifier', webpage
, 'video id',
39 default
=None) or self
._search
_regex
(
40 r
'id=["\']uuid
[^
>]+>([^
<]+)<', webpage, 'video
id')
42 title = self._og_search_title(webpage)
44 servers = self._download_json(
45 'http
://www
.dctp
.tv
/streaming_servers
/', display_id,
46 note='Downloading server
list', fatal=False)
52 if isinstance(server.get('endpoint
'), compat_str) and
53 'cloudfront
' in server['endpoint
'])
55 endpoint = 'rtmpe
://s2pqqn4u96e4j8
.cloudfront
.net
/cfx
/st
/'
57 app = self._search_regex(
58 r'^rtmpe?
://[^
/]+/(?P
<app
>.*)$
', endpoint, 'app
')
63 'play_path
': 'mp4
:%s_dctp
_0500_4x
3.m4v
' % video_id,
65 'player_url
': 'http
://svm
-prod
-dctptv
-static
.s3
.amazonaws
.com
/dctptv
-relaunch2012
-109.swf
',
69 description = self._html_search_meta('DC
.description
', webpage)
70 upload_date = unified_strdate(
71 self._html_search_meta('DC
.date
.created
', webpage))
72 thumbnail = self._og_search_thumbnail(webpage)
73 duration = float_or_none(self._search_regex(
74 r'id=["\']duration_in_ms[^+]>(\d+)', webpage, 'duration',
75 default=None), scale=1000)
81 'display_id': display_id,
82 'description': description,
83 'upload_date': upload_date,
84 'thumbnail': thumbnail,