コード例 #1
0
ファイル: writeToCSV.py プロジェクト: Isaac-V/Book-to-Movie
def updateBoxOffice(row):
    # Get movie's IMDb id from file
    movieID = re.sub('\D', '', row['const'])
    print 'Movie ID is:', movieID
    
    movieObject = IMDbMovie(movieID, ia)
    
    # Retrieve box office info from IMDbPY API
    #boxOffice = imdbInfo.getBoxOfficeAsDict(movieID)
    boxOffice = movieObject.getBoxOfficeAsDict()
    print boxOffice
    
    # Update row and return true
    row.update(boxOffice)
    return True
コード例 #2
0
def updateBoxOffice(row):
    # Get movie's IMDb id from file
    movieID = re.sub('\D', '', row['const'])
    print 'Movie ID is:', movieID

    movieObject = IMDbMovie(movieID, ia)

    # Retrieve box office info from IMDbPY API
    #boxOffice = imdbInfo.getBoxOfficeAsDict(movieID)
    boxOffice = movieObject.getBoxOfficeAsDict()
    print boxOffice

    # Update row and return true
    row.update(boxOffice)
    return True
コード例 #3
0
ファイル: writeToCSV.py プロジェクト: Isaac-V/Book-to-Movie
def moviesToDict(movieList, encodeTitles):
    dictList = []
    for movie in movieList:
        movieObj = IMDbMovie(imdbInfo.getMovieID(movie), ia)
        dictList.append(movieObj.convertToDict(encodeTitles))
    return dictList
コード例 #4
0
def moviesToDict(movieList, encodeTitles):
    dictList = []
    for movie in movieList:
        movieObj = IMDbMovie(imdbInfo.getMovieID(movie), ia)
        dictList.append(movieObj.convertToDict(encodeTitles))
    return dictList