Skip to content

Instantly share code, notes, and snippets.

@lennyerik
Created December 28, 2022 13:32
Show Gist options
  • Save lennyerik/2e0748d527785fa49c5e6186d7c333a9 to your computer and use it in GitHub Desktop.
Save lennyerik/2e0748d527785fa49c5e6186d7c333a9 to your computer and use it in GitHub Desktop.
Download CurseForge modpack without client
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