Spaces:
Running
Running
nothere990
commited on
Commit
•
28aa8cc
1
Parent(s):
d2b7267
update
Browse files- main.py +27 -8
- requirements.txt +2 -3
main.py
CHANGED
@@ -791,7 +791,14 @@ async def tiktokdl_(link: str):
|
|
791 |
)
|
792 |
|
793 |
@app.get("/akeno/xnxxsearch", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
|
794 |
-
async def xnxx_search(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
795 |
data_dict = {
|
796 |
"720p": search_filters.SearchingQuality.X_720p,
|
797 |
"1080p": search_filters.SearchingQuality.X_1080p_plus
|
@@ -803,19 +810,31 @@ async def xnxx_search(query: str, quality: str):
|
|
803 |
randydev={"error": "Invalid quality"}
|
804 |
)
|
805 |
SearchingQuality = data_dict[quality]
|
806 |
-
|
807 |
-
query,
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
813 |
response = search.videos
|
814 |
results = []
|
815 |
for x in response:
|
816 |
results.append({
|
817 |
"link": x.content_url,
|
818 |
"title": x.title,
|
|
|
819 |
"author": x.author,
|
820 |
"length": x.length,
|
821 |
"highest_quality": x.highest_quality,
|
|
|
791 |
)
|
792 |
|
793 |
@app.get("/akeno/xnxxsearch", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
|
794 |
+
async def xnxx_search(
|
795 |
+
query: str,
|
796 |
+
quality: str,
|
797 |
+
length: Optional[search_filters.Length] = None,
|
798 |
+
upload_time: Optional[search_filters.UploadTime] = None,
|
799 |
+
limit: Optional[int] = None,
|
800 |
+
mode: Optional[search_filters.Mode] = None
|
801 |
+
):
|
802 |
data_dict = {
|
803 |
"720p": search_filters.SearchingQuality.X_720p,
|
804 |
"1080p": search_filters.SearchingQuality.X_1080p_plus
|
|
|
810 |
randydev={"error": "Invalid quality"}
|
811 |
)
|
812 |
SearchingQuality = data_dict[quality]
|
813 |
+
search_kwargs = {
|
814 |
+
"query": query,
|
815 |
+
"searching_quality": SearchingQuality,
|
816 |
+
}
|
817 |
+
if length is not None:
|
818 |
+
search_kwargs["length"] = length
|
819 |
+
|
820 |
+
if upload_time is not None:
|
821 |
+
search_kwargs["upload_time"] = upload_time
|
822 |
+
|
823 |
+
if limit is not None:
|
824 |
+
search_kwargs["limit"] = limit
|
825 |
+
|
826 |
+
if mode is not None:
|
827 |
+
search_kwargs["mode"] = mode
|
828 |
+
|
829 |
+
# Perform the search with only the provided parameters
|
830 |
+
search = xnxx_client().search(**search_kwargs)
|
831 |
response = search.videos
|
832 |
results = []
|
833 |
for x in response:
|
834 |
results.append({
|
835 |
"link": x.content_url,
|
836 |
"title": x.title,
|
837 |
+
"url": x.url,
|
838 |
"author": x.author,
|
839 |
"length": x.length,
|
840 |
"highest_quality": x.highest_quality,
|
requirements.txt
CHANGED
@@ -37,8 +37,7 @@ huggingface_hub
|
|
37 |
pySmartDL
|
38 |
selenium
|
39 |
PyYAML==6.0.2
|
40 |
-
|
41 |
-
|
42 |
-
git+https://github.com/xtsea/xnxx_api
|
43 |
yt-dlp==2024.8.6
|
44 |
cryptography
|
|
|
37 |
pySmartDL
|
38 |
selenium
|
39 |
PyYAML==6.0.2
|
40 |
+
git+https://github.com/TeamKillerX/RyuzakiLib
|
41 |
+
git+https://github.com/prono69/xnxx_api
|
|
|
42 |
yt-dlp==2024.8.6
|
43 |
cryptography
|