修复小窗犯罪的错误,添加用户名与id,添加捡垃圾助手(默认不开启)
This commit is contained in:
parent
811826046b
commit
360d3ee92e
15
fetch_torn_items.py
Normal file
15
fetch_torn_items.py
Normal file
@ -0,0 +1,15 @@
|
||||
import json
|
||||
import requests
|
||||
|
||||
# URL = "https://jjins.github.io/item_price_raw.json"
|
||||
URL = "https://script.google.com/macros/s/AKfycbyRfg1Cx2Jm3IuCWASUu8czKeP3wm5jKsie4T4bxwZHzXTmPbaw4ybPRA/exec?key=getItems"
|
||||
resArr = requests.get(URL).json()['items']
|
||||
obj = {}
|
||||
for item in resArr:
|
||||
obj[item[0]] = {'name': item[1], 'price': item[2]}
|
||||
|
||||
file = open('item_price_raw.json', 'w')
|
||||
file.write(json.dumps(obj))
|
||||
file.close()
|
||||
|
||||
print('物品价格表已更新')
|
||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user