Spaces:
Running
Running
Upload main.py
Browse files
main.py
CHANGED
@@ -295,25 +295,7 @@ class XnxxSearch(BaseModel):
|
|
295 |
class XnxxLinks(BaseModel):
|
296 |
url: str
|
297 |
|
298 |
-
async def tools_search(
|
299 |
-
name=None,
|
300 |
-
parameter=None,
|
301 |
-
ai_model=None,
|
302 |
-
upload_check=False
|
303 |
-
):
|
304 |
-
if upload_check:
|
305 |
-
TOOLS_API_URL = f"{TOOLS_NEW_URL}/{ai_model}/{parameter}"
|
306 |
-
return TOOLS_API_URL
|
307 |
-
else:
|
308 |
-
TOOLS_API_URL = f"{TOOLS_NEW_URL}/tools/{name}?{parameter}"
|
309 |
-
return TOOLS_API_URL
|
310 |
-
|
311 |
async def toanime(input):
|
312 |
-
url = await tools_search(
|
313 |
-
ai_model="ai",
|
314 |
-
parameter="toanime",
|
315 |
-
upload_check=True
|
316 |
-
)
|
317 |
try:
|
318 |
image = Image.open(input)
|
319 |
buffer = io.BytesIO()
|
@@ -323,7 +305,7 @@ async def toanime(input):
|
|
323 |
'image': ('toanime.jpg', buffer, 'image/jpeg')
|
324 |
}
|
325 |
response = requests.post(
|
326 |
-
|
327 |
files=files,
|
328 |
headers={
|
329 |
'accept': 'application/json'
|
@@ -373,9 +355,8 @@ async def xnxx_search(
|
|
373 |
payload: XnxxSearch,
|
374 |
api_key: None = Depends(validate_api_key)
|
375 |
):
|
376 |
-
url = await tools_search(name="xnxxsearch", parameter=f"q={payload.query}")
|
377 |
try:
|
378 |
-
response = await AsyicXSearcher.search(
|
379 |
result = response["result"]
|
380 |
return SuccessResponse(
|
381 |
status="True",
|
@@ -392,9 +373,8 @@ async def xnxx_download(
|
|
392 |
payload: XnxxLinks,
|
393 |
api_key: None = Depends(validate_api_key)
|
394 |
):
|
395 |
-
url = await tools_search(name="xnxxdl", parameter=f"url={payload.link}")
|
396 |
try:
|
397 |
-
response = await AsyicXSearcher.search(url, re_json=True)
|
398 |
result = response["result"]
|
399 |
return SuccessResponse(
|
400 |
status="True",
|
@@ -411,9 +391,8 @@ async def xnxx_videodl(
|
|
411 |
payload: XnxxLinks,
|
412 |
api_key: None = Depends(validate_api_key)
|
413 |
):
|
414 |
-
url = await tools_search(name="xvideosdl", parameter=f"url={payload.link}")
|
415 |
try:
|
416 |
-
response = await AsyicXSearcher.search(url, re_json=True)
|
417 |
result = response["result"]
|
418 |
return SuccessResponse(
|
419 |
status="True",
|
@@ -430,9 +409,8 @@ async def instagramdl(
|
|
430 |
payload: XnxxLinks,
|
431 |
api_key: None = Depends(validate_api_key)
|
432 |
):
|
433 |
-
url = await tools_search(name="instagramdl", parameter=f"url={payload.link}")
|
434 |
try:
|
435 |
-
response = await AsyicXSearcher.search(url, re_json=True)
|
436 |
result = response["result"]
|
437 |
return SuccessResponse(
|
438 |
status="True",
|
|
|
295 |
class XnxxLinks(BaseModel):
|
296 |
url: str
|
297 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
async def toanime(input):
|
|
|
|
|
|
|
|
|
|
|
299 |
try:
|
300 |
image = Image.open(input)
|
301 |
buffer = io.BytesIO()
|
|
|
305 |
'image': ('toanime.jpg', buffer, 'image/jpeg')
|
306 |
}
|
307 |
response = requests.post(
|
308 |
+
"https://tools.betabotz.eu.org/ai/toanime",
|
309 |
files=files,
|
310 |
headers={
|
311 |
'accept': 'application/json'
|
|
|
355 |
payload: XnxxSearch,
|
356 |
api_key: None = Depends(validate_api_key)
|
357 |
):
|
|
|
358 |
try:
|
359 |
+
response = await AsyicXSearcher.search(f"https://tools.betabotz.eu.org/xnxxsearch?q={payload.query}", re_json=True)
|
360 |
result = response["result"]
|
361 |
return SuccessResponse(
|
362 |
status="True",
|
|
|
373 |
payload: XnxxLinks,
|
374 |
api_key: None = Depends(validate_api_key)
|
375 |
):
|
|
|
376 |
try:
|
377 |
+
response = await AsyicXSearcher.search(f"https://tools.betabotz.eu.org/xnxxdl?url={payload.link}", re_json=True)
|
378 |
result = response["result"]
|
379 |
return SuccessResponse(
|
380 |
status="True",
|
|
|
391 |
payload: XnxxLinks,
|
392 |
api_key: None = Depends(validate_api_key)
|
393 |
):
|
|
|
394 |
try:
|
395 |
+
response = await AsyicXSearcher.search(f"https://tools.betabotz.eu.org/xvideosdl?url={payload.link}", re_json=True)
|
396 |
result = response["result"]
|
397 |
return SuccessResponse(
|
398 |
status="True",
|
|
|
409 |
payload: XnxxLinks,
|
410 |
api_key: None = Depends(validate_api_key)
|
411 |
):
|
|
|
412 |
try:
|
413 |
+
response = await AsyicXSearcher.search(f"https://tools.betabotz.eu.org/instagramdl?url={payload.link}", re_json=True)
|
414 |
result = response["result"]
|
415 |
return SuccessResponse(
|
416 |
status="True",
|