Spaces:
Running
Running
Update api.py
Browse files
api.py
CHANGED
@@ -71,8 +71,12 @@ def solver_captcha():
|
|
71 |
data = request.get_json(force=True, silent=True)
|
72 |
if not check_request(require_data, data):
|
73 |
return jsonify(msg="Unauthorized Request"), 403
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
76 |
|
77 |
|
78 |
@app.route("/api/update", methods=["POST"])
|
|
|
71 |
data = request.get_json(force=True, silent=True)
|
72 |
if not check_request(require_data, data):
|
73 |
return jsonify(msg="Unauthorized Request"), 403
|
74 |
+
try:
|
75 |
+
resp = asyncio.run(hcaptcha_solver.main(data["host"], data["site_key"]))
|
76 |
+
return resp
|
77 |
+
except Exception as e:
|
78 |
+
print(e)
|
79 |
+
return "error",500
|
80 |
|
81 |
|
82 |
@app.route("/api/update", methods=["POST"])
|