Last active
December 7, 2025 20:58
-
-
Save leostera/07a75ddb6772f18777cf04b4222f2493 to your computer and use it in GitHub Desktop.
Revisions
-
leostera revised this gist
Dec 7, 2025 . 1 changed file with 1 addition and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,16 +8,10 @@ output_dir = Path(day) output_dir.mkdir(exist_ok=True) def download(file): data = requests.get(file["url"]).content (output_dir / file["name"]).write_bytes(data) print(f"✓ {file['name']} ({len(data) / 1e6:.1f} MB)") with ThreadPoolExecutor(max_workers=10) as executor: executor.map(download, index["files"]) -
leostera created this gist
Dec 7, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ import requests from pathlib import Path from concurrent.futures import ThreadPoolExecutor day = "2025-11-01" index = requests.get(f"https://data.solarchive.org/txs/{day}/index.json").json() output_dir = Path(day) output_dir.mkdir(exist_ok=True) def download(file): data = requests.get(file["url"]).content (output_dir / file["name"]).write_bytes(data) print(f"✓ {file['name']} ({len(data) / 1e6:.1f} MB)") with ThreadPoolExecutor(max_workers=10) as executor: executor.map(download, index["files"]) print( f"Downloaded {index['file_count']} files ({index['total_size_bytes'] / 1e9:.1f} GB)" )