Add Rotten Tomatoes rating

This commit is contained in:
JonnyWong16 2017-03-03 17:21:52 -08:00
parent 78fd83746e
commit f6fc142c47
4 changed files with 20 additions and 7 deletions

View file

@ -440,11 +440,8 @@ def convert_xml_to_dict(xml):
def get_percent(value1, value2):
if str(value1).isdigit() and str(value2).isdigit():
value1 = cast_to_float(value1)
value2 = cast_to_float(value2)
else:
return 0
value1 = cast_to_float(value1)
value2 = cast_to_float(value2)
if value1 != 0 and value2 != 0:
percent = (value1 / value2) * 100