mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-06-21 10:14:33 +00:00
Compare commits
No commits in common. "c723c4e5e78263df178dbe69844a3d05f3ef9e35" and "943083edcd3df45aaa597a6967bc6c95b720f54c" have entirely different histories.
c723c4e5e7
...
943083edcd
@ -314,20 +314,6 @@ class TestInfoExtractor(unittest.TestCase):
|
|||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
),
|
),
|
||||||
(
|
|
||||||
# test thumbnail_url key without URL scheme
|
|
||||||
r'''
|
|
||||||
<script type="application/ld+json">
|
|
||||||
{
|
|
||||||
"@context": "https://schema.org",
|
|
||||||
"@type": "VideoObject",
|
|
||||||
"thumbnail_url": "//www.nobelprize.org/images/12693-landscape-medium-gallery.jpg"
|
|
||||||
}</script>''',
|
|
||||||
{
|
|
||||||
'thumbnails': [{'url': 'https://www.nobelprize.org/images/12693-landscape-medium-gallery.jpg'}],
|
|
||||||
},
|
|
||||||
{},
|
|
||||||
),
|
|
||||||
]
|
]
|
||||||
for html, expected_dict, search_json_ld_kwargs in _TESTS:
|
for html, expected_dict, search_json_ld_kwargs in _TESTS:
|
||||||
expect_dict(
|
expect_dict(
|
||||||
|
|||||||
@ -1675,9 +1675,9 @@ class InfoExtractor:
|
|||||||
'ext': mimetype2ext(e.get('encodingFormat')),
|
'ext': mimetype2ext(e.get('encodingFormat')),
|
||||||
'title': unescapeHTML(e.get('name')),
|
'title': unescapeHTML(e.get('name')),
|
||||||
'description': unescapeHTML(e.get('description')),
|
'description': unescapeHTML(e.get('description')),
|
||||||
'thumbnails': traverse_obj(e, (('thumbnailUrl', 'thumbnailURL', 'thumbnail_url'), (None, ...), {
|
'thumbnails': [{'url': unescapeHTML(url)}
|
||||||
'url': ({str}, {unescapeHTML}, {self._proto_relative_url}, {url_or_none}),
|
for url in variadic(traverse_obj(e, 'thumbnailUrl', 'thumbnailURL'))
|
||||||
})),
|
if url_or_none(url)],
|
||||||
'duration': parse_duration(e.get('duration')),
|
'duration': parse_duration(e.get('duration')),
|
||||||
'timestamp': unified_timestamp(e.get('uploadDate')),
|
'timestamp': unified_timestamp(e.get('uploadDate')),
|
||||||
# author can be an instance of 'Organization' or 'Person' types.
|
# author can be an instance of 'Organization' or 'Person' types.
|
||||||
|
|||||||
@ -273,8 +273,6 @@ class OdnoklassnikiIE(InfoExtractor):
|
|||||||
return self._extract_desktop(smuggle_url(url, {'referrer': 'https://boosty.to'}))
|
return self._extract_desktop(smuggle_url(url, {'referrer': 'https://boosty.to'}))
|
||||||
elif error:
|
elif error:
|
||||||
raise ExtractorError(error, expected=True)
|
raise ExtractorError(error, expected=True)
|
||||||
elif '>Access to this video is restricted</div>' in webpage:
|
|
||||||
self.raise_login_required()
|
|
||||||
|
|
||||||
player = self._parse_json(
|
player = self._parse_json(
|
||||||
unescapeHTML(self._search_regex(
|
unescapeHTML(self._search_regex(
|
||||||
@ -431,7 +429,7 @@ class OdnoklassnikiIE(InfoExtractor):
|
|||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
|
|
||||||
webpage = self._download_webpage(
|
webpage = self._download_webpage(
|
||||||
f'https://m.ok.ru/video/{video_id}', video_id,
|
f'http://m.ok.ru/video/{video_id}', video_id,
|
||||||
note='Downloading mobile webpage')
|
note='Downloading mobile webpage')
|
||||||
|
|
||||||
error = self._search_regex(
|
error = self._search_regex(
|
||||||
|
|||||||
@ -236,7 +236,7 @@ class VimeoBaseInfoExtractor(InfoExtractor):
|
|||||||
for tt in (request.get('text_tracks') or []):
|
for tt in (request.get('text_tracks') or []):
|
||||||
subtitles.setdefault(tt['lang'], []).append({
|
subtitles.setdefault(tt['lang'], []).append({
|
||||||
'ext': 'vtt',
|
'ext': 'vtt',
|
||||||
'url': urljoin('https://player.vimeo.com/', tt['url']),
|
'url': urljoin('https://vimeo.com', tt['url']),
|
||||||
})
|
})
|
||||||
|
|
||||||
thumbnails = []
|
thumbnails = []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user