Skip to content

Commit 32f47ad

Browse files
committed
First Version
1 parent 2c21f06 commit 32f47ad

2 files changed

Lines changed: 33 additions & 21 deletions

File tree

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
# AC-Updater
2-
A Data Updater For Arknights-Cheater.
2+
3+
A Simple Data Updater for Arknights-Cheater.
4+
5+
6+
## Usage
7+
8+
- Throw `updater-main.py` into the folder of Arknights-Cheater.
9+
- Open the folder of Arknights-Cheater.
10+
- run `python updater-main.py` in current folder.
11+
- That's All!Enjoy!
Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
import requests
2-
import os
3-
if os.path.exists("character_table.json"):
4-
os.remove("character_table.json")
5-
else:
6-
print("The file character_table.json does not exist")
7-
8-
if os.path.exists("skin_table.json"):
9-
os.remove("skin_table.json")
10-
else:
11-
print("The file skin_table.json does not exist")
12-
print("downloading skins&characters")
13-
url = 'https://cdn.jsdelivr.net/gh/Kengxxiao/ArknightsGameData@master/zh_CN/gamedata/excel/character_table.json'
14-
r = requests.get(url)
15-
with open("character_table.json", "wb") as code:
16-
code.write(r.content)
17-
url = 'https://cdn.jsdelivr.net/gh/Kengxxiao/ArknightsGameData@master/zh_CN/gamedata/excel/skin_table.json'
18-
r = requests.get(url)
19-
with open("skin_table.json", "wb") as code:
20-
code.write(r.content)
1+
import requests
2+
import os
3+
if os.path.exists("character_table.json"):
4+
os.remove("character_table.json")
5+
print("The file character_table.json already exists.Updating...")
6+
else:
7+
print("The file character_table.json does not exist.Downloading...")
8+
9+
if os.path.exists("skin_table.json"):
10+
os.remove("skin_table.json")
11+
print("The file skin_table.json already exists.Updating...")
12+
else:
13+
print("The file character_table.json does not exist.Downloading...")
14+
print("downloading Skins&Characters")
15+
url = 'https://cdn.jsdelivr.net/gh/Kengxxiao/ArknightsGameData@master/zh_CN/gamedata/excel/character_table.json'
16+
r = requests.get(url)
17+
with open("character_table.json", "wb") as code:
18+
code.write(r.content)
19+
url = 'https://cdn.jsdelivr.net/gh/Kengxxiao/ArknightsGameData@master/zh_CN/gamedata/excel/skin_table.json'
20+
r = requests.get(url)
21+
with open("skin_table.json", "wb") as code:
22+
code.write(r.content)
23+
print("Successfully updated.Enjoy!")

0 commit comments

Comments
 (0)