Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -28,14 +28,14 @@ async def keep_alive_request(receiver_url: str):
|
|
28 |
firebase = initialize_app(firebase_config)
|
29 |
|
30 |
@app.get("/fetch_and_store_data")
|
31 |
-
def fetch_and_store_data(request: Request,url: str = "https://dailymo-api.onrender.com/dailymo/?reqUrl=https://dai.ly/k4Q1uMXJNjgzkHzEO2p
|
32 |
try:
|
33 |
# Fetch data from the provided URL
|
34 |
receiver_url = str(request.base_url)
|
35 |
print(receiver_url)
|
36 |
res=0
|
37 |
while res!=200:
|
38 |
-
response = requests.get(url)
|
39 |
res=response.status_code
|
40 |
background_tasks = BackgroundTasks()
|
41 |
background_tasks.add_task(keep_alive_request, receiver_url)
|
|
|
28 |
firebase = initialize_app(firebase_config)
|
29 |
|
30 |
@app.get("/fetch_and_store_data")
|
31 |
+
def fetch_and_store_data(request: Request,url: str = "https://dailymo-api.onrender.com/dailymo/?reqUrl=https://dai.ly/k4Q1uMXJNjgzkHzEO2p"):
|
32 |
try:
|
33 |
# Fetch data from the provided URL
|
34 |
receiver_url = str(request.base_url)
|
35 |
print(receiver_url)
|
36 |
res=0
|
37 |
while res!=200:
|
38 |
+
response = requests.get(url+'&vidFormat=http-380-0')
|
39 |
res=response.status_code
|
40 |
background_tasks = BackgroundTasks()
|
41 |
background_tasks.add_task(keep_alive_request, receiver_url)
|