Skip to content

Commit

Permalink
Create data.py
Browse files Browse the repository at this point in the history
  • Loading branch information
xnkit69 authored Sep 15, 2023
1 parent fb10f34 commit c21df4d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions day34 /data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import requests


parameters = {
"amount": 10,
"type": "boolean",
"category": 18,
}
response = requests.get(url="https://opentdb.com/api.php", params=parameters)
response.raise_for_status()
data = response.json()
question_data = data["results"]

0 comments on commit c21df4d

Please sign in to comment.