fix scores page

This commit is contained in:
Sarah 2022-12-10 17:10:24 +00:00
parent 8ba89ea288
commit 82e847cd2a

View File

@ -70,13 +70,12 @@ def build_page(keyword_data, minimum_score=1.0):
table = MarkdownUtils.MarkdownTable(["Keyword", "Number of VCinema Films", "Total IMDb entries", "Score"])
for keyword, data in keyword_data.items():
table += "\n"
number_of_vcinema_films = len(data['vcinema_films'])
number_of_imdb_films = data['total']
keyword_score = round(data['score'], 3)
row_data = [keyword, number_of_vcinema_films, number_of_imdb_films, keyword_score]
row_data = []
row_data.append(str(keyword))
row_data.append(str(len(data['vcinema_films'])))
row_data.append(str(data['total']))
row_data.append(str(round(data['score'], 3)))
table.add_row(row_data)
return table