Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -23,8 +23,8 @@ import time
|
|
23 |
@app.get("/get_scraped_data")
|
24 |
async def get_data(url: str):
|
25 |
# Start time
|
26 |
-
|
27 |
-
try:
|
28 |
data = await Scraper.scrape(url)
|
29 |
# End time
|
30 |
end_time = time.time()
|
@@ -34,6 +34,6 @@ async def get_data(url: str):
|
|
34 |
|
35 |
print(f"Time taken for the process: {elapsed_time:.2f} seconds")
|
36 |
return data
|
37 |
-
except Exception as e:
|
38 |
-
raise HTTPException(status_code=500, detail=str(e))
|
39 |
|
|
|
23 |
@app.get("/get_scraped_data")
|
24 |
async def get_data(url: str):
|
25 |
# Start time
|
26 |
+
start_time = time.time()
|
27 |
+
#try:
|
28 |
data = await Scraper.scrape(url)
|
29 |
# End time
|
30 |
end_time = time.time()
|
|
|
34 |
|
35 |
print(f"Time taken for the process: {elapsed_time:.2f} seconds")
|
36 |
return data
|
37 |
+
#except Exception as e:
|
38 |
+
#raise HTTPException(status_code=500, detail=str(e))
|
39 |
|