diff --git a/wiki_pages/FilmsByCountry.py b/wiki_pages/FilmsByCountry.py index 40264ce..5557a45 100644 --- a/wiki_pages/FilmsByCountry.py +++ b/wiki_pages/FilmsByCountry.py @@ -38,7 +38,7 @@ def build_page(films_by_country): png_data = draw_map(country_counter) encoded = base64.b64encode(png_data).decode("utf-8") image = "![](data:image/png;base64,{})".format(encoded) - page = image + "\n" + table + page = image + "\n" + str(table) return page @@ -64,17 +64,12 @@ def build_table(films_by_country): table = MarkdownUtils.MarkdownTable(["Country", "Films"]) for country, films in films_by_country_sorted.items(): - table += "\n" - - row_data = [] - - country_label = country if country in flags.keys(): - country_label += " " - country_label += flags[country] + country += " " + flags[country] - row_data.append(country_label) - row_data.append(VCinemaUtils.get_film_list(films)) + films = VCinemaUtils.get_film_list(films) + + row_data = [country, films] table.add_row(row_data)