File size: 252 Bytes
6715b3e
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
import requests, json
from app import DEFAULT_API_URL

QUESTIONS = requests.get(f"{DEFAULT_API_URL}/questions", timeout=15).json()

with open("questions.json", "w") as f:
    json.dump(QUESTIONS, f, indent=2)
print(f"Saved {len(QUESTIONS)} questions")