diff --git a/oxweb/imdb.py b/oxweb/imdb.py index 768867a..b0cf02a 100644 --- a/oxweb/imdb.py +++ b/oxweb/imdb.py @@ -409,7 +409,11 @@ def getMovieBusinessSum(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'] = int(intValue(business['budget'][0].replace(',', ''))) + budget = filter(lambda x: x.startswith('$'), business['budget']) + if not budget: + budget = business['budget'] + b_['budget'] = int(intValue(budget[0].replace(',', ''))) + if 'gross' in business: b_['gross'] = int(intValue(business['gross'][0].replace(',', ''))) #b_['gross'] = sum([int(intValue(i.replace(',', ''))) for i in business['gross']])