mirror of
https://github.com/Cockatrice/Magic-Spoiler.git
synced 2026-03-21 17:54:59 -05:00
Allow to define a list of set_types to exclude (#303)
* add sets * add comment * No lowercase transformation
This commit is contained in:
parent
c7a7a66523
commit
0efd986a16
|
|
@ -526,10 +526,15 @@ def get_spoiler_sets() -> List[Dict[str, str]]:
|
|||
return []
|
||||
|
||||
spoiler_sets = []
|
||||
# Find list of possible Set Types to exclude here: https://scryfall.com/docs/api/sets
|
||||
excluded_set_types = ["alchemy", "masterpiece", "arsenal", "from_the_vault", "spellbook", "premium_deck", "duel_deck",
|
||||
"draft_innovation", "treasure_chest", "planechase", "archenemy", "vanguard", "box", "promo",
|
||||
"token", "memorabilia", "minigame"]
|
||||
|
||||
for sf_set in sf_sets["data"]:
|
||||
if (
|
||||
sf_set["released_at"] >= time.strftime("%Y-%m-%d %H:%M:%S")
|
||||
and sf_set["set_type"] != "token"
|
||||
and sf_set["set_type"] not in excluded_set_types
|
||||
and sf_set["card_count"]
|
||||
):
|
||||
sf_set["code"] = sf_set["code"].upper()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user