include director,year

This commit is contained in:
j 2020-05-29 13:10:34 +02:00
parent 4f581e8d62
commit 918b66aae5

View file

@ -30,7 +30,7 @@ if __name__ == '__main__':
] ]
}, },
'range': [0, 100000], 'range': [0, 100000],
'keys': ['id', 'item', 'value', 'in', 'out', 'title'] 'keys': ['id', 'item', 'value', 'in', 'out', 'title', 'director', 'year']
}) })
for i in r['data']['items']: for i in r['data']['items']:
img = re.compile('<img src="(.*)">').findall(i['value']) img = re.compile('<img src="(.*)">').findall(i['value'])
@ -43,7 +43,11 @@ if __name__ == '__main__':
else: else:
tags = [] tags = []
name = i['title'].replace(' ', '_') name = i['title']
if i.get('year'):
name += '_(%s)' % i['year']
if i.get('director'):
name += '_' + ','.join(i['director'])
if tags: if tags:
name += '_' + ','.join(tags) name += '_' + ','.join(tags)