mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-08-09 13:39:40 +00:00
[ie] Improve JSON LD thumbnails extraction (#13368)
Authored by: bashonly, doe1080 Co-authored-by: doe1080 <98906116+doe1080@users.noreply.github.com>
This commit is contained in:
@@ -314,6 +314,20 @@ 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:
|
||||
expect_dict(
|
||||
|
Reference in New Issue
Block a user