Fixed error when captcha is not found

This commit is contained in:
UrloMythus
2026-01-11 09:41:45 +01:00 Unverified
parent 27f63b7d7c
commit 1aeb4d21cf
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -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")