1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-10-06 17:37:08 +02:00

Typecheck categories

This commit is contained in:
sepro 2024-06-30 03:33:38 +02:00 committed by GitHub
parent af91cc36f8
commit f32100e3aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,7 +107,7 @@ def _real_extract(self, url):
'description': ('body', {clean_html}),
'thumbnail': (('large_thumbnail', 'thumbnail'), any, {url_or_none}),
'duration': ('runTime', {parse_duration}),
'categories': ('taxonomy', 'name', {lambda x: x and [x]}),
'categories': ('taxonomy', 'name', {str}, {lambda x: x and [x]}),
'tags': ('topics', ..., 'name', {str}),
'modified_date': ('lastUpdated', {unified_strdate}),
}),