Update main.py
Browse files
main.py
CHANGED
@@ -31,8 +31,8 @@ async def read_root():
|
|
31 |
|
32 |
|
33 |
@app.get("/start_model_trigger")
|
34 |
-
async def model_trigger(page:
|
35 |
-
|
36 |
page = str(page)
|
37 |
url = "https://api-ai-service.transexpress.lk/trigger_the_data_fecher?page="+page+"&paginate=10000"
|
38 |
print(url,page)
|
@@ -45,8 +45,7 @@ async def model_trigger(page:str):
|
|
45 |
response = requests.request("GET", url, headers=headers, data=payload)
|
46 |
|
47 |
print(response.text)
|
48 |
-
|
49 |
-
|
50 |
-
page = page + 1
|
51 |
|
52 |
|
|
|
31 |
|
32 |
|
33 |
@app.get("/start_model_trigger")
|
34 |
+
async def model_trigger(page:int):
|
35 |
+
for page in range(page,page+2)
|
36 |
page = str(page)
|
37 |
url = "https://api-ai-service.transexpress.lk/trigger_the_data_fecher?page="+page+"&paginate=10000"
|
38 |
print(url,page)
|
|
|
45 |
response = requests.request("GET", url, headers=headers, data=payload)
|
46 |
|
47 |
print(response.text)
|
48 |
+
print(page)
|
49 |
+
return page
|
|
|
50 |
|
51 |
|