@@ -201,15 +201,18 @@ def get_arkose_token(
201201 else :
202202 working_endpoints : list [str ] = []
203203 # Check uptime for different endpoints via gatus
204- resp : list [dict ] = requests .get (
204+ resp2 : list [dict ] = requests .get (
205205 "https://stats.churchless.tech/api/v1/endpoints/statuses?page=1"
206206 ).json ()
207- for endpoint in resp :
207+ for endpoint in resp2 :
208+ # print(endpoint.get("name"))
208209 if endpoint .get ("group" ) != "Arkose Labs" :
209210 continue
210211 # Check the last 5 results
211- results : list [dict ] = endpoint .get ("results" , [])[:5 ]
212+ results : list [dict ] = endpoint .get ("results" , [])[- 5 :- 1 ]
213+ # print(results)
212214 if not results :
215+ print (f"Endpoint { endpoint .get ('name' )} has no results" )
213216 continue
214217 # Check if all the results are up
215218 if all (result .get ("success" ) == True for result in results ):
@@ -218,8 +221,9 @@ def get_arkose_token(
218221 print ("No working endpoints found. Please solve the captcha manually." )
219222 return get_arkose_token (download_images = True , captcha_supported = True )
220223 # Choose a random endpoint
224+ # print(working_endpoints)
221225 endpoint = random .choice (working_endpoints )
222- print (f"Using endpoint { endpoint } for captcha" )
226+ print (f"Using endpoint { endpoint } for captcha\n \n " )
223227 resp : requests .Response = requests .get (endpoint )
224228 if resp .status_code != 200 :
225229 if resp .status_code != 511 :
0 commit comments