init
Browse files- FetchRecipe.py +16 -0
FetchRecipe.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import requests
|
2 |
+
import json
|
3 |
+
|
4 |
+
url = "https://yummly2.p.rapidapi.com/feeds/auto-complete"
|
5 |
+
|
6 |
+
querystring = {"q":"chicken soup"}
|
7 |
+
|
8 |
+
headers = {
|
9 |
+
'x-rapidapi-host': "yummly2.p.rapidapi.com",
|
10 |
+
'x-rapidapi-key': "f6f6823b91msh9e92fed91d5356ap136f5djsn494d8f582fb3"
|
11 |
+
}
|
12 |
+
|
13 |
+
response = requests.request("GET", url, headers=headers, params=querystring)
|
14 |
+
json_data = json.loads(response.text)
|
15 |
+
|
16 |
+
print(json_data)
|