Skip to content

Instantly share code, notes, and snippets.

@ccerv1
Last active May 5, 2024 22:26
Show Gist options
  • Select an option

  • Save ccerv1/2d293a12975f859c58ba134f50022170 to your computer and use it in GitHub Desktop.

Select an option

Save ccerv1/2d293a12975f859c58ba134f50022170 to your computer and use it in GitHub Desktop.
FIL RetroPGF project application fetcher
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