Skip to content

Commit

Permalink
Fix split_name_code function. Closes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
brigattovictor committed Aug 20, 2019
1 parent 77eb63b commit 9d7b713
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ def parse_names(names):


def split_name_code(name_ligapokemon):
names = name_ligapokemon.split(" (")[0]
names = ' '.join(name_ligapokemon.split(" ")[:-1])
name_pt, name_en = parse_names(names)

code = name_ligapokemon.split(" (")[1].split("/")[0]
code = name_ligapokemon.split(" ")[-1].split("/")[0][1:]

return {"name_pt": name_pt, "name_en": name_en, "code": code}

Expand Down

0 comments on commit 9d7b713

Please sign in to comment.