【发布时间】:2021-07-05 16:34:28
【问题描述】:
我想知道是否有人可以帮助我从一个节目中获得所有演员的女演员的电影作品列表?
full_cast = ia.get_movie('0203259', 'full credits')
full_cast = full_cast['cast']
full_cast
我可以通过以下方式获得一个人的电影:
ice_t=i.get_person('0001384')
for job in ice_t['filmography'].keys():
print('# Job:', job)
for movie in ice_t['filmography'][job]:
print('\t t%s %s (role: %s)' % (movie.movieID, movie['title'], movie.currentRole))
但我不知道如何将上述函数应用于 full_cast。有人可以帮忙吗?
【问题讨论】:
-
我不知道
full_cast返回什么,但如果它返回包含个人 ID 号的内容,那显然只是for person in full_cast:/per = i.get_person(person.id)或其他什么。正确的?只是一个嵌套循环。 -
full_cast 返回一个包含 7K 人及其 ID 的列表,但恐怕我听不懂你在说什么。