Spaces:
Running
Running
Upload main.py
Browse files
main.py
CHANGED
@@ -101,6 +101,9 @@ from instagram import router as instagram_router
|
|
101 |
from driver import YoutubeDriver
|
102 |
from yt_dlp import YoutubeDL
|
103 |
|
|
|
|
|
|
|
104 |
logging.basicConfig(level=logging.ERROR)
|
105 |
logging.basicConfig(level=logging.INFO)
|
106 |
logger = logging.getLogger(__name__)
|
@@ -125,7 +128,6 @@ SOURCE_ASSISTANT_GOOGLE_AI = os.environ["SOURCE_ASSISTANT_GOOGLE_AI"]
|
|
125 |
SOURCE_MONITOR_URL = os.environ["SOURCE_MONITOR_URL"]
|
126 |
SOURCE_OPENAI_ACCESS_URL = os.environ["SOURCE_OPENAI_ACCESS_URL"]
|
127 |
SOURCE_PICSART_URL = os.environ["SOURCE_PICSART_URL"]
|
128 |
-
TOOLS_NEW_URL = os.environ["TOOLS_NEW_URL"]
|
129 |
|
130 |
# api keys
|
131 |
REVERSE_IMAGE_API = os.environ["REVERSE_IMAGE_API"]
|
@@ -725,62 +727,62 @@ async def tiktokdl_(link: str):
|
|
725 |
@app.get("/akeno/xnxxsearch", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
|
726 |
async def xnxx_search(query: str):
|
727 |
try:
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
except:
|
735 |
-
return SuccessResponse(
|
736 |
-
status="False",
|
737 |
-
randydev={"error": "Error fucking"}
|
738 |
)
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
750 |
return SuccessResponse(
|
751 |
status="False",
|
752 |
-
randydev={"error": "Error fucking"}
|
753 |
)
|
754 |
|
755 |
@app.get("/akeno/xnxx-dl", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
|
756 |
async def xnxx_download(link: str):
|
757 |
try:
|
758 |
-
|
759 |
-
|
760 |
return SuccessResponse(
|
761 |
status="True",
|
762 |
-
randydev={
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
763 |
)
|
764 |
-
except:
|
765 |
return SuccessResponse(
|
766 |
status="False",
|
767 |
-
randydev={"error": "Error fucking"}
|
768 |
)
|
769 |
|
770 |
-
@app.get("/akeno/xnxx-videodl", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
|
771 |
-
async def xnxx_videodl(link: str):
|
772 |
-
try:
|
773 |
-
response = await api_tools_fix(name="xvideosdl", ok="url", query=link)
|
774 |
-
result = response.get("result", {})
|
775 |
-
return SuccessResponse(
|
776 |
-
status="True",
|
777 |
-
randydev={"results": result}
|
778 |
-
)
|
779 |
-
except:
|
780 |
-
return SuccessResponse(
|
781 |
-
status="False",
|
782 |
-
randydev={"error": "Error fucking"}
|
783 |
-
)
|
784 |
|
785 |
@app.get("/akeno/instagramdl", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
|
786 |
async def instagramdl(link: str):
|
|
|
101 |
from driver import YoutubeDriver
|
102 |
from yt_dlp import YoutubeDL
|
103 |
|
104 |
+
from xnxx_api import search_filters
|
105 |
+
from xnxx_api.xnxx_api import Client as xnxx_client
|
106 |
+
|
107 |
logging.basicConfig(level=logging.ERROR)
|
108 |
logging.basicConfig(level=logging.INFO)
|
109 |
logger = logging.getLogger(__name__)
|
|
|
128 |
SOURCE_MONITOR_URL = os.environ["SOURCE_MONITOR_URL"]
|
129 |
SOURCE_OPENAI_ACCESS_URL = os.environ["SOURCE_OPENAI_ACCESS_URL"]
|
130 |
SOURCE_PICSART_URL = os.environ["SOURCE_PICSART_URL"]
|
|
|
131 |
|
132 |
# api keys
|
133 |
REVERSE_IMAGE_API = os.environ["REVERSE_IMAGE_API"]
|
|
|
727 |
@app.get("/akeno/xnxxsearch", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
|
728 |
async def xnxx_search(query: str):
|
729 |
try:
|
730 |
+
search = xnxx_client().search(
|
731 |
+
query,
|
732 |
+
length=search_filters.Length.X_0_10min,
|
733 |
+
upload_time=search_filters.UploadTime.year,
|
734 |
+
searching_quality=search_filters.SearchingQuality.X_1080p_plus,
|
735 |
+
limit=1
|
|
|
|
|
|
|
|
|
736 |
)
|
737 |
+
response = search.videos
|
738 |
+
for x in response:
|
739 |
+
return SuccessResponse(
|
740 |
+
status="True",
|
741 |
+
randydev={
|
742 |
+
"results": [
|
743 |
+
{
|
744 |
+
"link": x.content_url,
|
745 |
+
"title": x.title,
|
746 |
+
"author": x.author,
|
747 |
+
"length": x.highest_quality,
|
748 |
+
"highest_quality": x.highest_quality,
|
749 |
+
"publish_date": x.publish_date,
|
750 |
+
"views": x.views,
|
751 |
+
"thumb": x.thumbnail_url
|
752 |
+
}
|
753 |
+
]
|
754 |
+
}
|
755 |
+
)
|
756 |
+
except Exception as e:
|
757 |
return SuccessResponse(
|
758 |
status="False",
|
759 |
+
randydev={"error": f"Error fucking: {e}"}
|
760 |
)
|
761 |
|
762 |
@app.get("/akeno/xnxx-dl", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
|
763 |
async def xnxx_download(link: str):
|
764 |
try:
|
765 |
+
x = xnxx_client()
|
766 |
+
response = x.get_video(link)
|
767 |
return SuccessResponse(
|
768 |
status="True",
|
769 |
+
randydev={
|
770 |
+
"title": response.title,
|
771 |
+
"author": response.author,
|
772 |
+
"length": response.highest_quality,
|
773 |
+
"highest_quality": response.highest_quality,
|
774 |
+
"publish_date": response.publish_date,
|
775 |
+
"views": response.views,
|
776 |
+
"link": response.content_url,
|
777 |
+
"thumb": response.thumbnail_url
|
778 |
+
}
|
779 |
)
|
780 |
+
except Exception as e:
|
781 |
return SuccessResponse(
|
782 |
status="False",
|
783 |
+
randydev={"error": f"Error fucking: {e}"}
|
784 |
)
|
785 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
786 |
|
787 |
@app.get("/akeno/instagramdl", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
|
788 |
async def instagramdl(link: str):
|