diff --git a/oxweb/imdb.py b/oxweb/imdb.py index 109b3a4..768867a 100644 --- a/oxweb/imdb.py +++ b/oxweb/imdb.py @@ -408,11 +408,13 @@ def getMovieBusinessSum(imdbId): business = getMovieBusiness(imdbId) b_ = {'budget': 0, 'gross': 0, 'profit': 0} if 'budget' in business: - b_['budget'] = sum([int(intValue(i.replace(',', ''))) for i in business['budget']]) + #b_['budget'] = sum([int(intValue(i.replace(',', ''))) for i in business['budget']]) + b_['budget'] = int(intValue(business['budget'][0].replace(',', ''))) if 'gross' in business: - b_['gross'] = sum([int(intValue(i.replace(',', ''))) for i in business['gross']]) - if 'weekend gross' in business: - b_['gross'] += sum([int(intValue(i.replace(',', ''))) for i in business['weekend gross']]) + b_['gross'] = int(intValue(business['gross'][0].replace(',', ''))) + #b_['gross'] = sum([int(intValue(i.replace(',', ''))) for i in business['gross']]) + #if 'weekend gross' in business: + # b_['gross'] += sum([int(intValue(i.replace(',', ''))) for i in business['weekend gross']]) if b_['budget'] and b_['gross']: b_['profit'] = b_['gross'] - b_['budget'] return b_