Created
December 28, 2022 13:32
-
-
Save lennyerik/2e0748d527785fa49c5e6186d7c333a9 to your computer and use it in GitHub Desktop.
Download CurseForge modpack without client
This file contains 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 characters
import requests | |
import json | |
import os | |
j = json.loads(open('manifest.json', 'r').read()) | |
files = j['files'] | |
for i, f in enumerate(files): | |
url = f['downloadUrl'] | |
path = 'mods/' + url.split('/')[-1] | |
if not os.path.exists(path): | |
print(f'{i+1}/{len(files)} {path}') | |
r = requests.get(url) | |
with open(path, 'wb') as outfile: | |
outfile.write(r.content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment