Make these debug statements actually kind of make sense logically
This commit is contained in:
@@ -47,14 +47,16 @@ os.makedirs(DST_DIR, exist_ok=True)
|
|||||||
|
|
||||||
for AppSetting in AppSettings:
|
for AppSetting in AppSettings:
|
||||||
|
|
||||||
log.debug(f"Processing {AppSetting}")
|
log.debug(f"Attempting to retrieve {AppSetting}")
|
||||||
response = requests.get(AppSettings[AppSetting], headers={"Cookie": f".ROBLOSECURITY={ROBLOSECURITY}"})
|
response = requests.get(AppSettings[AppSetting], headers={"Cookie": f".ROBLOSECURITY={ROBLOSECURITY}"})
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
log.info(f"Successfully retrieved {AppSetting}")
|
log.info(f"Successfully retrieved {AppSetting}")
|
||||||
with open(os.path.join(DST_DIR, f"{AppSetting}.json"), "w") as f:
|
|
||||||
log.debug(f"Response is {len(response.content)/(1<<10):,.0f} kilobytes")
|
log.debug(f"Response is {len(response.content)/(1<<10):,.0f} kilobytes")
|
||||||
|
|
||||||
formatted_response = json.dumps(response.json(), indent=4)
|
formatted_response = json.dumps(response.json(), indent=4)
|
||||||
log.debug(f"Formatted {AppSetting}")
|
log.debug(f"Formatted {AppSetting}")
|
||||||
|
|
||||||
|
with open(os.path.join(DST_DIR, f"{AppSetting}.json"), "w") as f:
|
||||||
f.write(formatted_response)
|
f.write(formatted_response)
|
||||||
log.debug(f"Wrote {AppSetting}")
|
log.debug(f"Wrote {AppSetting}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user