Skip to content

Commit

Permalink
API: change various URLs after server reorganisation
Browse files Browse the repository at this point in the history
  • Loading branch information
mascal committed Dec 1, 2023
1 parent 4b81d09 commit 3ba885a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion collect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ source code (`submit.php` and `../js/api_url.js`)

The client code [can be found here](https://github.com/mascaldotfr/CoRT/commit/677a0c6cac5f265a5cf7719857bf2db9a1b483e1).

The dataset is available at: https://hail.thebus.top/cortdata/data.txt
The dataset is available at: https://hail.thebus.top/CoRT/collect/data.txt

Unlike `/warstatus` written in python, the collector is written in PHP, because
it's easier to deploy for people having a standard PHP enabled webhosting.
Expand Down
4 changes: 2 additions & 2 deletions collect/exploit.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
cached_datasets = {}

# get all shared setup data as str type
with urlopen("https://hail.thebus.top/cortdata/data.txt") as response:
with urlopen("https://hail.thebus.top/CoRT/collect/data.txt") as response:
db = response.read().decode('utf-8').splitlines()

for setup in db:
Expand All @@ -28,7 +28,7 @@
# get trainerdata according to the version of the recorded setup and cache status
trainerdata = None
if shared_dataset_version not in cached_datasets:
with urlopen(f'https://raw.githubusercontent.com/mascaldotfr/CoRT/main/data/{shared_dataset_version}/trainerdata.json') as response:
with urlopen(f'https://raw.githubusercontent.com/mascaldotfr/CoRT/main/data/trainer/{shared_dataset_version}/trainerdata.json') as response:
trainerdata = json.loads(response.read())
cached_datasets[shared_dataset_version] = trainerdata
print(f"Downloading a new dataset: {shared_dataset_version}")
Expand Down

0 comments on commit 3ba885a

Please sign in to comment.