mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-02 15:12:45 +00:00
Compare commits
5 Commits
6d4984e64e
...
c0c9cac554
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0c9cac554 | ||
|
|
f0bc71abf6 | ||
|
|
8a4b626daf | ||
|
|
f6dc7d5279 | ||
|
|
c5e55e0479 |
@ -638,6 +638,7 @@ from .fc2 import (
|
||||
)
|
||||
from .fczenit import FczenitIE
|
||||
from .fifa import FifaIE
|
||||
from .filmarchiv import FilmArchivIE
|
||||
from .filmon import (
|
||||
FilmOnChannelIE,
|
||||
FilmOnIE,
|
||||
|
||||
@ -14,7 +14,7 @@ from ..utils import (
|
||||
|
||||
|
||||
class DropboxIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://(?:www\.)?dropbox\.com/(?:(?:e/)?scl/fi|sh?)/(?P<id>\w+)'
|
||||
_VALID_URL = r'https?://(?:www\.)?dropbox\.com/(?:(?:e/)?scl/f[io]|sh?)/(?P<id>\w+)'
|
||||
_TESTS = [
|
||||
{
|
||||
'url': 'https://www.dropbox.com/s/nelirfsxnmcfbfh/youtube-dl%20test%20video%20%27%C3%A4%22BaW_jenozKc.mp4?dl=0',
|
||||
@ -35,6 +35,9 @@ class DropboxIE(InfoExtractor):
|
||||
}, {
|
||||
'url': 'https://www.dropbox.com/e/scl/fi/r2kd2skcy5ylbbta5y1pz/DJI_0003.MP4?dl=0&rlkey=wcdgqangn7t3lnmmv6li9mu9h',
|
||||
'only_matching': True,
|
||||
}, {
|
||||
'url': 'https://www.dropbox.com/scl/fo/zjfqse5txqfd7twa8iewj/AOfZzSYWUSKle2HD7XF7kzQ/A-BEAT%20C.mp4?rlkey=6tg3jkp4tv6a5vt58a6dag0mm&dl=0',
|
||||
'only_matching': True,
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
52
yt_dlp/extractor/filmarchiv.py
Normal file
52
yt_dlp/extractor/filmarchiv.py
Normal file
@ -0,0 +1,52 @@
|
||||
from .common import InfoExtractor
|
||||
from ..utils import clean_html
|
||||
from ..utils.traversal import (
|
||||
find_element,
|
||||
find_elements,
|
||||
traverse_obj,
|
||||
)
|
||||
|
||||
|
||||
class FilmArchivIE(InfoExtractor):
|
||||
IE_DESC = 'FILMARCHIV ON'
|
||||
_VALID_URL = r'https?://(?:www\.)?filmarchiv\.at/de/filmarchiv-on/video/(?P<id>f_[0-9a-zA-Z]{5,})'
|
||||
_TESTS = [{
|
||||
'url': 'https://www.filmarchiv.at/de/filmarchiv-on/video/f_0305p7xKrXUPBwoNE9x6mh',
|
||||
'md5': '54a6596f6a84624531866008a77fa27a',
|
||||
'info_dict': {
|
||||
'id': 'f_0305p7xKrXUPBwoNE9x6mh',
|
||||
'ext': 'mp4',
|
||||
'title': 'Der Wurstelprater zur Kaiserzeit',
|
||||
'description': 'md5:9843f92df5cc9a4975cee7aabcf6e3b2',
|
||||
'thumbnail': r're:https://cdn\.filmarchiv\.at/f_0305/p7xKrXUPBwoNE9x6mh_v1/poster\.jpg',
|
||||
},
|
||||
}, {
|
||||
'url': 'https://www.filmarchiv.at/de/filmarchiv-on/video/f_0306vI3wO0tJIsfrqYFQXF',
|
||||
'md5': '595385d7f54cb6529140ee8de7d1c3c7',
|
||||
'info_dict': {
|
||||
'id': 'f_0306vI3wO0tJIsfrqYFQXF',
|
||||
'ext': 'mp4',
|
||||
'title': 'Vor 70 Jahren: Wettgehen der Briefträger in Wien',
|
||||
'description': 'md5:b2a2e4230923cd1969d471c552e62811',
|
||||
'thumbnail': r're:https://cdn\.filmarchiv\.at/f_0306/vI3wO0tJIsfrqYFQXF_v1/poster\.jpg',
|
||||
},
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
media_id = self._match_id(url)
|
||||
webpage = self._download_webpage(url, media_id)
|
||||
path = '/'.join((media_id[:6], media_id[6:]))
|
||||
formats, subtitles = self._extract_m3u8_formats_and_subtitles(
|
||||
f'https://cdn.filmarchiv.at/{path}_v1_sv1/playlist.m3u8', media_id)
|
||||
|
||||
return {
|
||||
'id': media_id,
|
||||
'title': traverse_obj(webpage, ({find_element(tag='title-div')}, {clean_html})),
|
||||
'description': traverse_obj(webpage, (
|
||||
{find_elements(tag='div', attr='class', value=r'.*\bborder-base-content\b', regex=True)}, ...,
|
||||
{find_elements(tag='div', attr='class', value=r'.*\bprose\b', html=False, regex=True)}, ...,
|
||||
{clean_html}, any)),
|
||||
'thumbnail': f'https://cdn.filmarchiv.at/{path}_v1/poster.jpg',
|
||||
'formats': formats,
|
||||
'subtitles': subtitles,
|
||||
}
|
||||
@ -46,6 +46,7 @@ class GofileIE(InfoExtractor):
|
||||
'videopassword': 'password',
|
||||
},
|
||||
}]
|
||||
_STATIC_TOKEN = '4fd6sg89d7s6' # From https://gofile.io/dist/js/config.js
|
||||
_TOKEN = None
|
||||
|
||||
def _real_initialize(self):
|
||||
@ -60,13 +61,16 @@ class GofileIE(InfoExtractor):
|
||||
self._set_cookie('.gofile.io', 'accountToken', self._TOKEN)
|
||||
|
||||
def _entries(self, file_id):
|
||||
query_params = {'wt': '4fd6sg89d7s6'} # From https://gofile.io/dist/js/alljs.js
|
||||
password = self.get_param('videopassword')
|
||||
if password:
|
||||
query_params = {}
|
||||
if password := self.get_param('videopassword'):
|
||||
query_params['password'] = hashlib.sha256(password.encode()).hexdigest()
|
||||
|
||||
files = self._download_json(
|
||||
f'https://api.gofile.io/contents/{file_id}', file_id, 'Getting filelist',
|
||||
query=query_params, headers={'Authorization': f'Bearer {self._TOKEN}'})
|
||||
query=query_params, headers={
|
||||
'Authorization': f'Bearer {self._TOKEN}',
|
||||
'X-Website-Token': self._STATIC_TOKEN,
|
||||
})
|
||||
|
||||
status = files['status']
|
||||
if status == 'error-passwordRequired':
|
||||
|
||||
@ -15,7 +15,7 @@ from ..utils import (
|
||||
|
||||
class TubiTvIE(InfoExtractor):
|
||||
IE_NAME = 'tubitv'
|
||||
_VALID_URL = r'https?://(?:www\.)?tubitv\.com/(?P<type>video|movies|tv-shows)/(?P<id>\d+)'
|
||||
_VALID_URL = r'https?://(?:www\.)?tubitv\.com/(?:[a-z]{2}-[a-z]{2}/)?(?P<type>video|movies|tv-shows)/(?P<id>\d+)'
|
||||
_LOGIN_URL = 'http://tubitv.com/login'
|
||||
_NETRC_MACHINE = 'tubitv'
|
||||
_TESTS = [{
|
||||
@ -73,6 +73,9 @@ class TubiTvIE(InfoExtractor):
|
||||
'release_year': 1979,
|
||||
},
|
||||
'skip': 'Content Unavailable',
|
||||
}, {
|
||||
'url': 'https://tubitv.com/es-mx/tv-shows/477363/s01-e03-jacob-dos-dos-y-la-tarjets-de-hockey-robada',
|
||||
'only_matching': True,
|
||||
}]
|
||||
|
||||
# DRM formats are included only to raise appropriate error
|
||||
|
||||
@ -1212,7 +1212,7 @@ def create_parser():
|
||||
help='Maximum number of seconds to sleep. Can only be used along with --min-sleep-interval')
|
||||
workarounds.add_option(
|
||||
'--sleep-subtitles', metavar='SECONDS',
|
||||
dest='sleep_interval_subtitles', default=0, type=int,
|
||||
dest='sleep_interval_subtitles', default=0, type=float,
|
||||
help='Number of seconds to sleep before each subtitle download')
|
||||
|
||||
verbosity = optparse.OptionGroup(parser, 'Verbosity and Simulation Options')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user