CognitiveScience commited on
Commit
f248660
·
1 Parent(s): eb695d4

Update ecogsphere.py

Browse files
Files changed (1) hide show
  1. ecogsphere.py +12 -3
ecogsphere.py CHANGED
@@ -12,6 +12,15 @@ headers = {
12
  "X-RapidAPI-Host": "youtube-search-results.p.rapidapi.com"
13
  }
14
 
15
- response = requests.get(url, headers=headers, params=querystring)
16
- response=response.json()
17
- print(response)
 
 
 
 
 
 
 
 
 
 
12
  "X-RapidAPI-Host": "youtube-search-results.p.rapidapi.com"
13
  }
14
 
15
+ def ecs(inp):
16
+ inp=querystring
17
+
18
+ if inp is None:
19
+ response = "No Input!"
20
+ else:
21
+ try:
22
+ response = requests.get(url, headers=headers, params=inp)
23
+ except NameError:
24
+ response="Wrong Input!"
25
+
26
+ return response