Skip to content

Commit

Permalink
god dammit
Browse files Browse the repository at this point in the history
  • Loading branch information
Metalloriff committed May 23, 2024
1 parent c03e2a9 commit 715b1c5
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions __main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,23 @@ def select_anime():
return results[index - 1]
except KeyboardInterrupt:
exit()

anime, id, cover, _ = select_anime()

anime = None
id = None
cover = None
data = select_anime()

# I would make fun of whoever thought this API change was OK,
# but that would be ableism.
if isinstance(data, dict):
anime = data["0"]
id = data["1"]
cover = data["2"]
else:
anime = data[0]
id = data[1]
cover = data[2]

episodes = json.loads(requests.get(f"{api}/episodes.php?id={id}").content)[::-1]

clear()
Expand Down

0 comments on commit 715b1c5

Please sign in to comment.