Last active
May 5, 2024 22:26
-
-
Save ccerv1/2d293a12975f859c58ba134f50022170 to your computer and use it in GitHub Desktop.
FIL RetroPGF project application fetcher
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 characters
| import json | |
| import requests | |
| url = 'https://www.fil-retropgf.io/api/trpc/projects.search?input=%7B%22json%22%3A%20%7B%22limit%22%3A%201000%7D%7D' | |
| response = requests.get(url) | |
| data = response.json() | |
| projects = data['result']['data']['json'] | |
| for p in projects: | |
| r = requests.get(p['metadataPtr']) | |
| app = json.loads(r.content) | |
| p.update({'app': app}) | |
| with open("FIL_RetroPGF1_applications.json", "w") as f: | |
| json.dump(projects, f, indent=2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment