parse lyricist, singer

This commit is contained in:
j 2018-07-09 15:20:13 +02:00
parent d21b0b675c
commit 7041d1b316

View file

@ -512,14 +512,23 @@ class Imdb(SiteParser):
credits = [c for c in credits if c[1]]
self['credits'] = []
self['lyricist'] = []
self['singer'] = []
for department, crew in credits:
department = department.replace('(in alphabetical order)', '').strip()
for c in crew:
name = c[0]
roles = c[1]
self['credits'].append({
'name': c[0],
'roles': c[1],
'name': name,
'roles': roles,
'deparment': department
})
if department == 'Music Department':
if 'lyricist' in roles:
self['lyricist'].append(name)
if 'playback singer' in roles:
self['singer'].append(name)
if not self['credits']:
del self['credits']