use BASE var in bulk_create output
This commit is contained in:
parent
ec64e81829
commit
703a210f1e
1 changed files with 4 additions and 4 deletions
|
@ -4,7 +4,7 @@ import sys
|
|||
|
||||
import requests
|
||||
|
||||
BASE = "https://in.ccc.ac/api"
|
||||
BASE = "https://in.ccc.ac"
|
||||
COUNT = 0
|
||||
START_ID = 1
|
||||
|
||||
|
@ -12,7 +12,7 @@ START_ID = 1
|
|||
session = requests.Session()
|
||||
# session.auth = (":)", ":)")
|
||||
|
||||
res = session.get(f"{BASE}/items")
|
||||
res = session.get(f"{BASE}/api/items")
|
||||
res.raise_for_status()
|
||||
ids = res.json().keys()
|
||||
kiste_ids = {int(i.lstrip("K")) for i in ids if i.startswith("K") and i != "K"}
|
||||
|
@ -42,6 +42,6 @@ for i in new_ids:
|
|||
"note": "Bitte Name, Ort, Inhalt eintragen",
|
||||
"hidden": False,
|
||||
}
|
||||
res = session.put(f"{BASE}/items/{j['id']}", json=j)
|
||||
res = session.put(f"{BASE}/api/items/{j['id']}", json=j)
|
||||
res.raise_for_status()
|
||||
print(f"{j['id']},https://in.ccc.ac/form.html?id={j['id']}")
|
||||
print(f"{j['id']},{BASE}/form.html?id={j['id']}")
|
||||
|
|
Loading…
Reference in a new issue