only last gross / budget, not sum
This commit is contained in:
parent
ce0d5692c7
commit
1145a42e5c
1 changed files with 6 additions and 4 deletions
|
@ -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_
|
||||
|
|
Loading…
Reference in a new issue