[Minds] Fix handling of non-string values
This commit is contained in:
parent
11f239840b
commit
a11f9bbf0c
@ -78,8 +78,15 @@ class MindsIE(InfoExtractor):
|
|||||||
if res.headers.get('content-type', '').startswith('image/'):
|
if res.headers.get('content-type', '').startswith('image/'):
|
||||||
thumbnail = getattr(res, 'url', None)
|
thumbnail = getattr(res, 'url', None)
|
||||||
tags = data.get('tags', '').strip()
|
tags = data.get('tags', '').strip()
|
||||||
if isinstance(tags, compat_str):
|
if isinstance(tags, compat_str) and tags:
|
||||||
tags = [x.strip() for x in tags.split(',')]
|
tags = [x.strip() for x in tags.split(',')]
|
||||||
|
else:
|
||||||
|
tags = None
|
||||||
|
category = data.get('category')
|
||||||
|
if isinstance(category, compat_str) and category:
|
||||||
|
category = [category]
|
||||||
|
else:
|
||||||
|
category = None
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user