randydev commited on
Commit
ce19537
·
verified ·
1 Parent(s): e32a357

Upload main.py

Browse files
Files changed (1) hide show
  1. main.py +17 -15
main.py CHANGED
@@ -347,10 +347,15 @@ async def toanime_endpoint(file: UploadFile = File(...)):
347
  if os.path.exists(file_path):
348
  os.remove(file_path)
349
 
350
- @app.post("/akeno/xnxxsearch", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
351
- async def xnxx_search(payload: XnxxSearch):
 
 
 
 
 
352
  try:
353
- response = requests.get(f"https://tools.betabotz.eu.org/xnxxsearch?q={payload.query}").json()
354
  result = response.get("result", {})
355
  return SuccessResponse(
356
  status="True",
@@ -362,10 +367,10 @@ async def xnxx_search(payload: XnxxSearch):
362
  randydev={"error": "Error fucking"}
363
  )
364
 
365
- @app.post("/akeno/xnxx-dl", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
366
- async def xnxx_download(payload: XnxxLinks):
367
  try:
368
- response = requests.get(f"https://tools.betabotz.eu.org/xnxxdl?url={payload.link}").json()
369
  result = response.get("result", {})
370
  return SuccessResponse(
371
  status="True",
@@ -377,10 +382,10 @@ async def xnxx_download(payload: XnxxLinks):
377
  randydev={"error": "Error fucking"}
378
  )
379
 
380
- @app.post("/akeno/xnxx-videodl", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
381
- async def xnxx_videodl(payload: XnxxLinks):
382
  try:
383
- response = requests.get(f"https://tools.betabotz.eu.org/xvideosdl?url={payload.link}").json()
384
  result = response.get("result", {})
385
  return SuccessResponse(
386
  status="True",
@@ -392,13 +397,10 @@ async def xnxx_videodl(payload: XnxxLinks):
392
  randydev={"error": "Error fucking"}
393
  )
394
 
395
- @app.post("/akeno/instagramdl", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
396
- async def instagramdl(
397
- payload: XnxxLinks,
398
- api_key: None = Depends(validate_api_key)
399
- ):
400
  try:
401
- response = requests.get(f"https://tools.betabotz.eu.org/instagramdl?url={payload.link}").json()
402
  result = response.get("result", {})
403
  return SuccessResponse(
404
  status="True",
 
347
  if os.path.exists(file_path):
348
  os.remove(file_path)
349
 
350
+ async def api_tools_fix(name, ok, query):
351
+ url = f"https://tools.betabotz.eu.org/tools/{name}?{ok}={query}"
352
+ response = requests.get(url).json()
353
+ return response
354
+
355
+ @app.get("/akeno/xnxxsearch", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
356
+ async def xnxx_search(query: str):
357
  try:
358
+ response = await api_tools_fix(name="xnxxsearch", ok="q", query=query)
359
  result = response.get("result", {})
360
  return SuccessResponse(
361
  status="True",
 
367
  randydev={"error": "Error fucking"}
368
  )
369
 
370
+ @app.get("/akeno/xnxx-dl", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
371
+ async def xnxx_download(link: str):
372
  try:
373
+ response = await api_tools_fix(name="xnxxdl", ok="url", query=link)
374
  result = response.get("result", {})
375
  return SuccessResponse(
376
  status="True",
 
382
  randydev={"error": "Error fucking"}
383
  )
384
 
385
+ @app.get("/akeno/xnxx-videodl", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
386
+ async def xnxx_videodl(link: str):
387
  try:
388
+ response = await api_tools_fix(name="xvideosdl", ok="url", query=link)
389
  result = response.get("result", {})
390
  return SuccessResponse(
391
  status="True",
 
397
  randydev={"error": "Error fucking"}
398
  )
399
 
400
+ @app.get("/akeno/instagramdl", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
401
+ async def instagramdl(link: str):
 
 
 
402
  try:
403
+ response = await api_tools_fix(name="instagramdl", ok="url", query=link)
404
  result = response.get("result", {})
405
  return SuccessResponse(
406
  status="True",