CognitiveScience commited on
Commit
c9b6101
·
1 Parent(s): bf86616

Create ecogsphere.py

Browse files
Files changed (1) hide show
  1. ecogsphere.py +17 -0
ecogsphere.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import os
3
+
4
+ RA_TOKEN = os.environ.get('RA_KEY')
5
+
6
+ url = "https://youtube-search-results.p.rapidapi.com/youtube-search/"
7
+
8
+ querystring = {"q":"daniel+dennett"}
9
+
10
+ headers = {
11
+ "X-RapidAPI-Key": RA_TOKEN,
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)