Spaces:
Running
Running
Upload main.py
Browse files
main.py
CHANGED
@@ -725,40 +725,51 @@ async def tiktokdl_(link: str):
|
|
725 |
)
|
726 |
|
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=
|
735 |
limit=1
|
736 |
)
|
737 |
response = search.videos
|
|
|
738 |
for x in response:
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
)
|
756 |
except Exception as e:
|
757 |
return SuccessResponse(
|
758 |
status="False",
|
759 |
-
randydev={"error": f"Error
|
760 |
)
|
761 |
|
|
|
762 |
@app.get("/akeno/xnxx-dl", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
|
763 |
async def xnxx_download(link: str):
|
764 |
try:
|
|
|
725 |
)
|
726 |
|
727 |
@app.get("/akeno/xnxxsearch", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
|
728 |
+
async def xnxx_search(query: str, quality: str):
|
729 |
+
data_dict = {
|
730 |
+
"720p": search_filters.SearchingQuality.X_720p,
|
731 |
+
"1080p": search_filters.SearchingQuality.X_1080p_plus
|
732 |
+
}
|
733 |
try:
|
734 |
+
if quality not in data_dict:
|
735 |
+
return SuccessResponse(
|
736 |
+
status="False",
|
737 |
+
randydev={"error": "Invalid quality"}
|
738 |
+
)
|
739 |
+
SearchingQuality = data_dict[quality]
|
740 |
search = xnxx_client().search(
|
741 |
query,
|
742 |
length=search_filters.Length.X_0_10min,
|
743 |
upload_time=search_filters.UploadTime.year,
|
744 |
+
searching_quality=SearchingQuality,
|
745 |
limit=1
|
746 |
)
|
747 |
response = search.videos
|
748 |
+
results = []
|
749 |
for x in response:
|
750 |
+
results.append({
|
751 |
+
"link": x.content_url,
|
752 |
+
"title": x.title,
|
753 |
+
"author": x.author,
|
754 |
+
"length": x.length,
|
755 |
+
"highest_quality": x.highest_quality,
|
756 |
+
"publish_date": x.publish_date,
|
757 |
+
"views": x.views,
|
758 |
+
"thumb": x.thumb
|
759 |
+
})
|
760 |
+
return SuccessResponse(
|
761 |
+
status="True",
|
762 |
+
randydev={
|
763 |
+
"results": results
|
764 |
+
}
|
765 |
+
)
|
|
|
766 |
except Exception as e:
|
767 |
return SuccessResponse(
|
768 |
status="False",
|
769 |
+
randydev={"error": f"Error: {e}"}
|
770 |
)
|
771 |
|
772 |
+
|
773 |
@app.get("/akeno/xnxx-dl", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
|
774 |
async def xnxx_download(link: str):
|
775 |
try:
|