Skip to content

Commit

Permalink
Fixed problem with menu creation
Browse files Browse the repository at this point in the history
Fixed major problem with menu creation
  • Loading branch information
Danjar27 authored Apr 16, 2022
2 parents e973a94 + 9a429f1 commit 21f560d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion getBCE/Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ def menu_creator(pre_menu: list) -> dict:
:param pre_menu: compact_date()
:return: { year: [(month, href), (month, href), ...], ... }
"""
return {item[0]: item[1:] for item in pre_menu}
menu = dict()
for item in pre_menu:
if item[0] in menu:
menu[item[0]].append(item[1])
else:
menu[item[0]] = [item[1]]
return menu


def date_and_href_to_menu(href: List[str], date: List[str]) -> dict:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name='getBCE',
packages=['getBCE'],
version="1.5.3",
version="1.5.3.5",
description='Download data from BCE (Banco Central del ecuador) webpage',
author='S. Daniel Jaramillo',
author_email='[email protected]',
Expand Down

0 comments on commit 21f560d

Please sign in to comment.