Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Kotoki1337 committed Mar 1, 2024
1 parent 7da727b commit 6e0a421
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import json
from collections import Counter

TOKEN = os.environ.get("TOKEN")
# TOKEN = os.environ.get("TOKEN")

TOKEN = "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"

repo = "HarukaKinen/Cardentify"

Expand Down Expand Up @@ -49,7 +51,7 @@
json.dump(banks, f, indent=4)

cards = sorted(cards, key=lambda x: x["issuer"]["english_name"])
cards = sorted(cards, key=lambda x: (-country_counts[x["card"]["country"]], x["card"]["country"]))
cards = sorted(cards, key=lambda x: x["card"]["country"])

with open("data.json", "w") as f:
json.dump(cards, f, indent=4)

0 comments on commit 6e0a421

Please sign in to comment.