Frontmatter updates and new custom deck
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import json, urllib.request
|
||||
|
||||
searches = ["Violent", "Scoot", "Ripper", "Inquisitioner", "Sparkles"]
|
||||
HEADERS = {"Content-Type": "application/json", "User-Agent": "Mozilla/5.0"}
|
||||
|
||||
for s in searches:
|
||||
b = json.dumps({"search": s}).encode()
|
||||
r = urllib.request.Request(
|
||||
"https://runeterra.ar/api/cards/get/en_us?game=chrono",
|
||||
data=b,
|
||||
headers=HEADERS,
|
||||
)
|
||||
d = json.loads(urllib.request.urlopen(r, timeout=10).read())
|
||||
print(f"Search '{s}': {len(d['cards'])} results")
|
||||
for c in d["cards"]:
|
||||
print(f" {c['name']} - {c['rarity']} - {c['artistName']}")
|
||||
for ac in c.get("associatedCards", []):
|
||||
print(f" ac: {ac['name']} - {ac['rarity']} - {ac['artistName']}")
|
||||
Reference in New Issue
Block a user