mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 15:14:57 +00:00
parent
f775c83110
commit
be44eefd5e
2 changed files with 75 additions and 0 deletions
|
@ -420,6 +420,7 @@ from .fc2 import (
|
||||||
FC2EmbedIE,
|
FC2EmbedIE,
|
||||||
)
|
)
|
||||||
from .fczenit import FczenitIE
|
from .fczenit import FczenitIE
|
||||||
|
from .filmmodu import FilmmoduIE
|
||||||
from .filmon import (
|
from .filmon import (
|
||||||
FilmOnIE,
|
FilmOnIE,
|
||||||
FilmOnChannelIE,
|
FilmOnChannelIE,
|
||||||
|
|
74
yt_dlp/extractor/filmmodu.py
Normal file
74
yt_dlp/extractor/filmmodu.py
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
# coding: utf-8
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from .common import InfoExtractor
|
||||||
|
from ..utils import int_or_none
|
||||||
|
|
||||||
|
|
||||||
|
class FilmmoduIE(InfoExtractor):
|
||||||
|
_VALID_URL = r'https?://(?:www.)?filmmodu.org/(?P<id>[^/]+-(?:turkce-dublaj-izle|altyazili-izle))'
|
||||||
|
_TESTS = [{
|
||||||
|
'url': 'https://www.filmmodu.org/f9-altyazili-izle',
|
||||||
|
'md5': 'aeefd955c2a508a5bdaa3bcec8eeb0d4',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '10804',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'F9',
|
||||||
|
'description': 'md5:2713f584a4d65afa2611e2948d0b953c',
|
||||||
|
'subtitles': {
|
||||||
|
'tr': [{
|
||||||
|
'ext': 'vtt',
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
'thumbnail': r're:https://s[0-9]+.filmmodu.org/uploads/movie/cover/10804/xXHZeb1yhJvnSHPzZDqee0zfMb6.jpg',
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
'url': 'https://www.filmmodu.org/the-godfather-turkce-dublaj-izle',
|
||||||
|
'md5': '109f2fcb9c941330eed133971c035c00',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '3646',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Baba',
|
||||||
|
'description': 'md5:d43fd651937cd75cc650883ebd8d8461',
|
||||||
|
'thumbnail': r're:https://s[0-9]+.filmmodu.org/uploads/movie/cover/3646/6xKCYgH16UuwEGAyroLU6p8HLIn.jpg',
|
||||||
|
},
|
||||||
|
}]
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
video_id = self._match_id(url)
|
||||||
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
title = self._og_search_title(webpage, fatal=True)
|
||||||
|
description = self._og_search_description(webpage)
|
||||||
|
thumbnail = self._og_search_thumbnail(webpage)
|
||||||
|
real_video_id = self._search_regex(r'var\s*videoId\s*=\s*\'([0-9]+)\'', webpage, 'video_id')
|
||||||
|
video_type = self._search_regex(r'var\s*videoType\s*=\s*\'([a-z]+)\'', webpage, 'video_type')
|
||||||
|
data = self._download_json('https://www.filmmodu.org/get-source', real_video_id, query={
|
||||||
|
'movie_id': real_video_id,
|
||||||
|
'type': video_type,
|
||||||
|
})
|
||||||
|
formats = [{
|
||||||
|
'url': source['src'],
|
||||||
|
'ext': 'mp4',
|
||||||
|
'format_id': source['label'],
|
||||||
|
'height': int_or_none(source.get('res')),
|
||||||
|
'protocol': 'm3u8_native',
|
||||||
|
} for source in data['sources']]
|
||||||
|
|
||||||
|
self._sort_formats(formats)
|
||||||
|
|
||||||
|
subtitles = {}
|
||||||
|
|
||||||
|
if data.get('subtitle'):
|
||||||
|
subtitles['tr'] = [{
|
||||||
|
'url': data['subtitle'],
|
||||||
|
}]
|
||||||
|
|
||||||
|
return {
|
||||||
|
'id': real_video_id,
|
||||||
|
'display_id': video_id,
|
||||||
|
'title': title,
|
||||||
|
'description': description,
|
||||||
|
'formats': formats,
|
||||||
|
'subtitles': subtitles,
|
||||||
|
'thumbnail': thumbnail,
|
||||||
|
}
|
Loading…
Reference in a new issue