diff --git a/test/test_InfoExtractor.py b/test/test_InfoExtractor.py index a16bc16ef..d22b61f62 100644 --- a/test/test_InfoExtractor.py +++ b/test/test_InfoExtractor.py @@ -230,7 +230,7 @@ def test_search_json_ld_realworld(self): 'description': 'md5:16756d0a18f33bf550e683d134a72f3c', 'modified_timestamp': 1636523573, 'release_timestamp': 1636523400, - 'tags': ['μαχαίρωμα,συμμορία ανηλίκων,ΕΙΔΗΣΕΙΣ,ΕΙΔΗΣΕΙΣ ΣΗΜΕΡΑ,ΝΕΑ,Κοινωνία - Ant1news'], + 'tags': 'count:6', 'thumbnails': [{'url': 'https://ant1media.azureedge.net/imgHandler/1100/a635c968-be71-447c-bf9c-80d843ece21e.jpg'}], 'uploader': 'Ant1news', }, @@ -376,7 +376,7 @@ def test_search_json_ld_realworld(self): 'description': 'md5:40eaf402631e0a77d8d74f66574bb978', 'modified_timestamp': 1747319520, 'release_timestamp': 1747319520, - 'tags': ['enseignement secondaire'], + 'tags': 'count:1', 'timestamp': 1747319520, 'thumbnails': [{'url': 'https://www.telemb.be/cdn/ff/pKwkkhB7a5GqSf98QdDUcn9WlvGTYyilvXisHO3fHpI/1747320854/public/2025-05/00006554_avc-tmb-093031.jpeg'}], 'uploader': 'Tele MB', diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index d3abba036..74ed84050 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -1748,7 +1748,7 @@ def traverse_json_ld(json_ld, at_top_level=True): 'description': (('description', 'articleBody'), {str}, {unescapeHTML}, any), 'modified_timestamp': ('dateModified', {parse_iso8601}), 'release_timestamp': ('datePublished', {parse_iso8601}), - 'tags': ('keywords', {str}, {unescapeHTML}, filter, all), + 'tags': ('keywords', {str}, {unescapeHTML}, {lambda x: x.split(',')}, filter), 'thumbnails': ('image', ..., { 'url': ({str}, {unescapeHTML}, {self._proto_relative_url}, {url_or_none}), }),