]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/netzkino.py
2 from __future__
import unicode_literals
6 from .common
import InfoExtractor
15 class NetzkinoIE(InfoExtractor
):
16 _VALID_URL
= r
'https?://(?:www\.)?netzkino\.de/\#!/[^/]+/(?P<id>[^/]+)'
19 'url': 'https://www.netzkino.de/#!/scifikino/rakete-zum-mond',
20 'md5': '92a3f8b76f8d7220acce5377ea5d4873',
22 'id': 'rakete-zum-mond',
24 'title': 'Rakete zum Mond \u2013 Jules Verne',
25 'description': 'md5:f0a8024479618ddbfa450ff48ffa6c60',
26 'upload_date': '20120813',
27 'thumbnail': r
're:https?://.*\.jpg$',
28 'timestamp': 1344858571,
32 'skip_download': 'Download only works from Germany',
35 'url': 'https://www.netzkino.de/#!/filme/dr-jekyll-mrs-hyde-2',
36 'md5': 'c7728b2dadd04ff6727814847a51ef03',
38 'id': 'dr-jekyll-mrs-hyde-2',
40 'title': 'Dr. Jekyll & Mrs. Hyde 2',
41 'description': 'md5:c2e9626ebd02de0a794b95407045d186',
42 'upload_date': '20190130',
43 'thumbnail': r
're:https?://.*\.jpg$',
44 'timestamp': 1548849437,
48 'skip_download': 'Download only works from Germany',
52 def _real_extract(self
, url
):
53 mobj
= re
.match(self
._VALID
_URL
, url
)
54 video_id
= mobj
.group('id')
56 api_url
= 'https://api.netzkino.de.simplecache.net/capi-2.0a/movies/%s.json?d=www' % video_id
57 info
= self
._download
_json
(api_url
, video_id
)
58 custom_fields
= info
['custom_fields']
60 production_js
= self
._download
_webpage
(
61 'http://www.netzkino.de/beta/dist/production.min.js', video_id
,
62 note
='Downloading player code')
63 avo_js
= self
._search
_regex
(
64 r
'var urlTemplate=(\{.*?"\})',
65 production_js
, 'URL templates')
66 templates
= self
._parse
_json
(
67 avo_js
, video_id
, transform_source
=js_to_json
)
70 'hds': '.mp4/manifest.f4m',
71 'hls': '.mp4/master.m3u8',
74 film_fn
= custom_fields
['Streaming'][0]
78 'url': tpl
.replace('{}', film_fn
) + suffix
[key
],
79 } for key
, tpl
in templates
.items()]
80 self
._sort
_formats
(formats
)
85 'title': info
['title'],
86 'age_limit': int_or_none(custom_fields
.get('FSK')[0]),
87 'timestamp': parse_iso8601(info
.get('date'), delimiter
=' '),
88 'description': clean_html(info
.get('content')),
89 'thumbnail': info
.get('thumbnail'),