Spaces:
Runtime error
Runtime error
File size: 848 Bytes
c9b6101 895ca7b 595f028 c9b6101 895ca7b 9621405 c9b6101 9621405 c9b6101 16d05f3 f248660 55c2f3d f248660 aaf93fe |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
import requests
import os
import math
RB_TOKEN=str(int(math.sqrt(1)+math.factorial(int(math.log2(int(math.log10(10)))))))
RA_TOKEN = os.environ.get('RA_KEY')
if RA_TOKEN is None:
RA_TOKEN=""
RA_TOKEN = "0eb1c72c02mshff1677e9c2e4928p1be55cjsn0fead1e1a6c9" #"bd9aa1d28bmsh04ce300944d4185p14d490jsn690bae90367"+ RB_TOKEN+RA_TOKEN
url = "https://youtube-search-results.p.rapidapi.com/youtube-search/"
querystring = {"q":"robert+west"}
headers = {
"X-RapidAPI-Key": RA_TOKEN,
"X-RapidAPI-Host": "youtube-search-results.p.rapidapi.com"
}
def ecf(inp):
inp=querystring
if inp is None:
response = "No Input!"
else:
try:
response = requests.get(url, headers=headers, params=inp)
response=response.json()
except NameError:
response="Wrong Input!"
return response |