]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/filmmodu.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
5 from ..utils
import int_or_none
8 class FilmmoduIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://(?:www.)?filmmodu.org/(?P<id>[^/]+-(?:turkce-dublaj-izle|altyazili-izle))'
11 'url': 'https://www.filmmodu.org/f9-altyazili-izle',
12 'md5': 'aeefd955c2a508a5bdaa3bcec8eeb0d4',
17 'description': 'md5:2713f584a4d65afa2611e2948d0b953c',
23 'thumbnail': r
're:https://s[0-9]+.filmmodu.org/uploads/movie/cover/10804/xXHZeb1yhJvnSHPzZDqee0zfMb6.jpg',
26 'url': 'https://www.filmmodu.org/the-godfather-turkce-dublaj-izle',
27 'md5': '109f2fcb9c941330eed133971c035c00',
32 'description': 'md5:d43fd651937cd75cc650883ebd8d8461',
33 'thumbnail': r
're:https://s[0-9]+.filmmodu.org/uploads/movie/cover/3646/6xKCYgH16UuwEGAyroLU6p8HLIn.jpg',
37 def _real_extract(self
, url
):
38 video_id
= self
._match
_id
(url
)
39 webpage
= self
._download
_webpage
(url
, video_id
)
40 title
= self
._og
_search
_title
(webpage
, fatal
=True)
41 description
= self
._og
_search
_description
(webpage
)
42 thumbnail
= self
._og
_search
_thumbnail
(webpage
)
43 real_video_id
= self
._search
_regex
(r
'var\s*videoId\s*=\s*\'([0-9]+)\'', webpage, 'video_id
')
44 video_type = self._search_regex(r'var\s
*videoType\s
*=\s
*\'([a
-z
]+)\'', webpage, 'video_type
')
45 data = self._download_json('https
://www
.filmmodu
.org
/get
-source
', real_video_id, query={
46 'movie_id
': real_video_id,
52 'format_id
': source['label
'],
53 'height
': int_or_none(source.get('res
')),
54 'protocol
': 'm3u8_native
',
55 } for source in data['sources
']]
57 self._sort_formats(formats)
61 if data.get('subtitle
'):
63 'url
': data['subtitle
'],
68 'display_id
': video_id,
70 'description
': description,
72 'subtitles
': subtitles,
73 'thumbnail
': thumbnail,