Esempio n. 1
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
Esempio n. 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
Esempio n. 3
0
def moviesToDict(movieList, encodeTitles):
    dictList = []
    for movie in movieList:
        movieObj = IMDbMovie(imdbInfo.getMovieID(movie), ia)
        dictList.append(movieObj.convertToDict(encodeTitles))
    return dictList
Esempio n. 4
0
def moviesToDict(movieList, encodeTitles):
    dictList = []
    for movie in movieList:
        movieObj = IMDbMovie(imdbInfo.getMovieID(movie), ia)
        dictList.append(movieObj.convertToDict(encodeTitles))
    return dictList