update gitignore file

This commit is contained in:
2026-02-05 07:31:43 -05:00
parent 26a7e94b4e
commit bbf92af79f
9 changed files with 9 additions and 671 deletions
-22
View File
@@ -1,22 +0,0 @@
#!/usr/bin/env python3
import os
import json
import requests
import time
def download_json_to_file(api_url, outputdir, output_file, lprint):
"""
Downloads JSON data from the given API URL and saves it to the specified file.
"""
try:
response = requests.get(api_url)
response.raise_for_status() # Raise an error for bad status codes
data = response.json()
with open(f"{outputdir}{output_file}", 'w') as f:
json.dump(data, f, indent=4)
#print(f"JSON data saved to {outputdir}{output_file}")
time.sleep(0.5) # Sleep for 0.5 second to avoid overwhelming the server
except Exception as e:
lprint.logprint("info", f"Downloadinng {outputdir}{output_file} for series ID: {output_file.replace('.json', '')} failed: {e}")