Spaces:
Runtime error
Runtime error
Commit
·
65fbc45
1
Parent(s):
cf7624b
Update ecogsphere.py
Browse files- ecogsphere.py +2 -0
ecogsphere.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import requests
|
| 2 |
import os
|
| 3 |
import math
|
|
|
|
| 4 |
|
| 5 |
RB_TOKEN=str(int(math.sqrt(1)+math.factorial(int(math.log2(int(math.log10(10)))))))
|
| 6 |
|
|
@@ -26,6 +27,7 @@ def ecf(inp):
|
|
| 26 |
try:
|
| 27 |
response = requests.get(url, headers=headers, params=inp)
|
| 28 |
response=response.json()
|
|
|
|
| 29 |
except NameError:
|
| 30 |
response="Wrong Input!"
|
| 31 |
|
|
|
|
| 1 |
import requests
|
| 2 |
import os
|
| 3 |
import math
|
| 4 |
+
import pandas as pd
|
| 5 |
|
| 6 |
RB_TOKEN=str(int(math.sqrt(1)+math.factorial(int(math.log2(int(math.log10(10)))))))
|
| 7 |
|
|
|
|
| 27 |
try:
|
| 28 |
response = requests.get(url, headers=headers, params=inp)
|
| 29 |
response=response.json()
|
| 30 |
+
response = pd.DataFrame.from_dict(response["videos"][0])
|
| 31 |
except NameError:
|
| 32 |
response="Wrong Input!"
|
| 33 |
|