如何获得使用IMBdPY作为列表的导演?

时间:2018-07-11 13:33:47

标签: python-3.x

我想获得董事名单。预先感谢

import imdb

ia = imdb.IMDb()
mInfo = ia.search_movie('Avengers: Infinity War')
mID = mInfo[0].movieID
movie = ia.get_movie(mID)
for i in movie['director']:
    print(i)

1 个答案:

答案 0 :(得分:0)

您在这里:

directorList = list()
for i in movie['director']:
    directorList.append(str(i))

print(directorList)

输出:

['Anthony Russo', 'Joe Russo']