From 1aeb4d21cf2e07c8279e2e4877fbfdab3a2d160a Mon Sep 17 00:00:00 2001 From: UrloMythus Date: Sun, 11 Jan 2026 09:41:45 +0100 Subject: [PATCH] Fixed error when captcha is not found --- run.py | 3 ++- static/uprot.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/run.py b/run.py index 1e82567..689bab2 100644 --- a/run.py +++ b/run.py @@ -330,7 +330,8 @@ async def uprot(request: Request): async with AsyncSession(proxies = proxies) as client: image, cookies = await get_uprot_numbers(client) response = static.TemplateResponse('uprot.html',{'request':request,"image_url": image}) - response.set_cookie(key='PHPSESSID', value=cookies['PHPSESSID'],httponly=True) + if cookies: + response.set_cookie(key='PHPSESSID', value=cookies.get('PHPSESSID'),httponly=True) return response @app.post("/uprot") diff --git a/static/uprot.html b/static/uprot.html index 596bfbd..92279c1 100644 --- a/static/uprot.html +++ b/static/uprot.html @@ -116,7 +116,7 @@

Inserire i numeri in foto per abilitare la fonte MaxStream per la durata di un giorno
https://github.com/UrloMythus/MammaMia/

- captcha1 + Failed to get the captcha