Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,9 @@ import json
|
|
5 |
def get_api(inp,call,val,tot):
|
6 |
if not tot:
|
7 |
r = requests.get(f'{inp}?{call}={val}')
|
8 |
-
|
|
|
|
|
9 |
else:
|
10 |
out_box=[]
|
11 |
data=""
|
@@ -15,12 +17,8 @@ def get_api(inp,call,val,tot):
|
|
15 |
r = requests.get(f'{inp}?{call}={i}')
|
16 |
new_data=r.text
|
17 |
new_dict = json.loads(new_data)
|
18 |
-
|
19 |
-
|
20 |
-
#out={"id":r.text['id']}
|
21 |
-
#print (out)
|
22 |
-
print(new_dict)
|
23 |
-
out_box.append({'id':new_dict['id']})
|
24 |
except Exception as e:
|
25 |
print (f"{i} - {e}")
|
26 |
pass
|
|
|
5 |
def get_api(inp,call,val,tot):
|
6 |
if not tot:
|
7 |
r = requests.get(f'{inp}?{call}={val}')
|
8 |
+
new_data=r.text
|
9 |
+
new_dict = json.loads(new_data)
|
10 |
+
return (new_dict)
|
11 |
else:
|
12 |
out_box=[]
|
13 |
data=""
|
|
|
17 |
r = requests.get(f'{inp}?{call}={i}')
|
18 |
new_data=r.text
|
19 |
new_dict = json.loads(new_data)
|
20 |
+
#print(new_dict)
|
21 |
+
out_box.append(new_dict)
|
|
|
|
|
|
|
|
|
22 |
except Exception as e:
|
23 |
print (f"{i} - {e}")
|
24 |
pass
|