Spaces:
Paused
Paused
Update main.py
Browse files
main.py
CHANGED
|
@@ -210,19 +210,6 @@ async def navigate_to(url: str):
|
|
| 210 |
except Exception as e:
|
| 211 |
return {"status": "warning", "message": f"Navigation completed with issue: {e}"}
|
| 212 |
|
| 213 |
-
@app.get("/cookies")
|
| 214 |
-
async def get_cookies():
|
| 215 |
-
"""获取当前cookies"""
|
| 216 |
-
global context
|
| 217 |
-
if not context:
|
| 218 |
-
return {"status": "error", "message": "Browser not initialized"}
|
| 219 |
-
|
| 220 |
-
try:
|
| 221 |
-
cookies = await context.cookies()
|
| 222 |
-
return {"status": "success", "count": len(cookies), "cookies": cookies}
|
| 223 |
-
except Exception as e:
|
| 224 |
-
return {"status": "error", "message": str(e)}
|
| 225 |
-
|
| 226 |
@app.get("/health")
|
| 227 |
async def health_check():
|
| 228 |
"""健康检查"""
|
|
|
|
| 210 |
except Exception as e:
|
| 211 |
return {"status": "warning", "message": f"Navigation completed with issue: {e}"}
|
| 212 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 213 |
@app.get("/health")
|
| 214 |
async def health_check():
|
| 215 |
"""健康检查"""
|