From 7592749cbe377675688dfcad5b7c1d46bbb684e1 Mon Sep 17 00:00:00 2001 From: nixxo Date: Sat, 1 Jan 2022 20:50:27 +0100 Subject: [extractor] Extract thumbnails from JSON-LD (#2195) Authored by: nixxo --- test/test_InfoExtractor.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'test/test_InfoExtractor.py') diff --git a/test/test_InfoExtractor.py b/test/test_InfoExtractor.py index cf06dbde4..25bc00e0b 100644 --- a/test/test_InfoExtractor.py +++ b/test/test_InfoExtractor.py @@ -208,6 +208,32 @@ class TestInfoExtractor(unittest.TestCase): }, {'expected_type': 'NewsArticle'}, ), + ( + # test multiple thumbnails in a list + r''' +''', + { + 'thumbnails': [{'url': 'https://www.rainews.it/cropgd/640x360/dl/img/2021/12/30/1640886376927_GettyImages.jpg'}], + }, + {}, + ), + ( + # test single thumbnail + r''' +''', + { + 'thumbnails': [{'url': 'https://www.rainews.it/cropgd/640x360/dl/img/2021/12/30/1640886376927_GettyImages.jpg'}], + }, + {}, + ) ] for html, expected_dict, search_json_ld_kwargs in _TESTS: expect_dict( -- cgit v1.2.3