@@ -192,7 +192,7 @@ async def other_api(gt: str, challenge: str):
192192async def rrocr (gt : str , challenge : str , referer : str ):
193193 ji_fen = await gain_num ("rr" )
194194 if int (ji_fen ) < 10 :
195- Logger .info ("人人打码" , info = "➤➤" , result = "积分不足" , result_type = False )
195+ Logger .info ("[ 人人打码] " , info = "➤➤" , result = "积分不足" , result_type = False )
196196 return "j" , "j"
197197 params = {
198198 "appkey" : config .rrocr_key ,
@@ -208,29 +208,30 @@ async def rrocr(gt: str, challenge: str, referer: str):
208208 timeout = 60 ,
209209 )
210210 except Exception as e :
211- Logger .info ("人人打码" , info = "➤➤" , result = f"请求失败{ e } " , result_type = False )
211+ Logger .info ("[ 人人打码] " , info = "➤➤" , result = f"请求失败{ e } " , result_type = False )
212212 return "j" , "j"
213213 if response .status_code != 200 :
214- Logger .info ("人人打码" , info = "➤➤" , result = "请求失败" , result_type = False )
214+ Logger .info ("[ 人人打码] " , info = "➤➤" , result = "请求失败" , result_type = False )
215215 return "j" , "j"
216216 data = response .json ()
217217 if "data" in data and "validate" in data ["data" ]:
218+ Logger .info ("[人人打码]" , info = "➤➤" , result = "成功" , result_type = True )
218219 validate , challenge = (
219220 data ["data" ]["validate" ],
220221 data ["data" ]["challenge" ],
221222 )
222223 return validate , challenge
223224 else :
224225 Logger .info (
225- "人人打码" , info = "➤➤" , result = data ["msg" ], result_type = False
226+ "[ 人人打码] " , info = "➤➤" , result = data ["msg" ], result_type = False
226227 ) # 打码失败输出错误信息,返回'j'
227228 return "j" , "j" # 失败返回'j' 成功返回validate
228229
229230
230231async def ttocr (gt : str , challenge : str , referer : str ):
231232 ji_fen = await gain_num ("tt" )
232233 if int (ji_fen ) < 10 :
233- Logger .info ("套套打码" , info = "➤➤" , result = "积分不足" , result_type = False )
234+ Logger .info ("[ 套套打码] " , info = "➤➤" , result = "积分不足" , result_type = False )
234235 return "j" , "j"
235236 data = {
236237 "appkey" : config .ttocr_key ,
@@ -246,14 +247,14 @@ async def ttocr(gt: str, challenge: str, referer: str):
246247 timeout = 60 ,
247248 )
248249 except Exception as e :
249- Logger .info ("套套打码" , info = "➤➤" , result = f"请求失败{ e } " , result_type = False )
250+ Logger .info ("[ 套套打码] " , info = "➤➤" , result = f"请求失败{ e } " , result_type = False )
250251 return "j" , "j"
251252 if get_id .status_code != 200 :
252- Logger .info ("套套打码" , info = "➤➤" , result = "验证失败" , result_type = False )
253+ Logger .info ("[ 套套打码] " , info = "➤➤" , result = "验证失败" , result_type = False )
253254 return "j" , "j"
254255 get_id = get_id .json ()
255256 result_id = get_id ["resultid" ]
256- Logger .info ("套套打码" , info = "➤➤" , result = "等待15s获取结果" , result_type = True )
257+ Logger .info ("[ 套套打码] " , info = "➤➤" , result = "等待15s获取结果" , result_type = True )
257258 await asyncio .sleep (15 )
258259 for i in range (5 ):
259260 try :
@@ -267,7 +268,7 @@ async def ttocr(gt: str, challenge: str, referer: str):
267268 )
268269 except Exception as e :
269270 Logger .info (
270- "套套打码" , info = "➤➤" , result = f"第{ 1 + 1 } 请求失败{ e } " , result_type = False
271+ "[ 套套打码] " , info = "➤➤" , result = f"第{ 1 + 1 } 请求失败{ e } " , result_type = False
271272 )
272273 await asyncio .sleep (1.5 )
273274 continue
@@ -278,25 +279,26 @@ async def ttocr(gt: str, challenge: str, referer: str):
278279 break
279280 else :
280281 Logger .info (
281- "套套打码" ,
282+ "[ 套套打码] " ,
282283 info = "➤➤" ,
283284 result = f"获取结果第{ 1 + 1 } 请求失败,等待1.5s后重试" ,
284285 result_type = False ,
285286 )
286287 await asyncio .sleep (1.5 )
287288 else :
288289 Logger .info (
289- "套套打码" , info = "➤➤" , result = "请求失败,可能是网络原因" , result_type = False
290+ "[ 套套打码] " , info = "➤➤" , result = "请求失败,可能是网络原因" , result_type = False
290291 )
291292 return "j" , "j"
292293 res = res .json ()
293294 # 失败返回'j' 成功返回validate
294295 if "data" in res and "validate" in res ["data" ]:
296+ Logger .info ("[套套打码]" , info = "➤➤" , result = "成功" , result_type = True )
295297 validate , challenge = res ["data" ]["validate" ], res ["data" ]["challenge" ]
296298 return validate , challenge
297299 else :
298300 Logger .info (
299- "套套打码" , info = "➤➤" , result = res ["msg" ], result_type = False
301+ "[ 套套打码] " , info = "➤➤" , result = res ["msg" ], result_type = False
300302 ) # 打码失败输出错误信息,返回'j'
301303 return "j" , "j"
302304
@@ -326,7 +328,7 @@ async def gain_num(choice) -> Optional[str]:
326328 data = await aiorequests .get (option .get ("url" ))
327329 except Exception as e :
328330 Logger .info (
329- f"{ choice } 打码查询积分 " , info = "➤➤" , result = f"请求失败{ e } " , result_type = False
331+ f"[ { choice } 打码]查询积分 " , info = "➤➤" , result = f"请求失败{ e } " , result_type = False
330332 )
331333 return None
332334 if data .status_code != 200 :
0 commit comments