Spaces:
Running
Running
Commit
·
3ffddbe
1
Parent(s):
b4a0a6a
update main.py
Browse files
main.py
CHANGED
@@ -46,6 +46,7 @@ from typing import *
|
|
46 |
from typing_extensions import Annotated
|
47 |
from typing import Annotated, Union
|
48 |
from typing import Optional, List, Dict, Any
|
|
|
49 |
|
50 |
from pydantic import BaseModel, EmailStr
|
51 |
from base64 import b64decode as kc
|
@@ -798,6 +799,7 @@ async def xnxx_search(
|
|
798 |
length: Optional[str] = None,
|
799 |
mode: Optional[str] = None,
|
800 |
limit: Optional[int] = None,
|
|
|
801 |
):
|
802 |
data_dict = {
|
803 |
"quality": {
|
@@ -852,10 +854,13 @@ async def xnxx_search(
|
|
852 |
|
853 |
# Perform the search with only the provided parameters
|
854 |
search = xnxx_client().search(**search_kwargs)
|
855 |
-
|
856 |
-
results
|
|
|
|
|
|
|
857 |
for x in response:
|
858 |
-
|
859 |
"link": x.content_url,
|
860 |
"title": x.title,
|
861 |
"url": x.url,
|
@@ -869,7 +874,7 @@ async def xnxx_search(
|
|
869 |
return SuccessResponse(
|
870 |
status="True",
|
871 |
randydev={
|
872 |
-
"results":
|
873 |
}
|
874 |
)
|
875 |
except Exception as e:
|
|
|
46 |
from typing_extensions import Annotated
|
47 |
from typing import Annotated, Union
|
48 |
from typing import Optional, List, Dict, Any
|
49 |
+
from itertools import islice
|
50 |
|
51 |
from pydantic import BaseModel, EmailStr
|
52 |
from base64 import b64decode as kc
|
|
|
799 |
length: Optional[str] = None,
|
800 |
mode: Optional[str] = None,
|
801 |
limit: Optional[int] = None,
|
802 |
+
results: Optional[int] = 36
|
803 |
):
|
804 |
data_dict = {
|
805 |
"quality": {
|
|
|
854 |
|
855 |
# Perform the search with only the provided parameters
|
856 |
search = xnxx_client().search(**search_kwargs)
|
857 |
+
res = search.videos
|
858 |
+
if results is not None:
|
859 |
+
response = islice(res, results)
|
860 |
+
|
861 |
+
results_list = []
|
862 |
for x in response:
|
863 |
+
results_list.append({
|
864 |
"link": x.content_url,
|
865 |
"title": x.title,
|
866 |
"url": x.url,
|
|
|
874 |
return SuccessResponse(
|
875 |
status="True",
|
876 |
randydev={
|
877 |
+
"results": results_list
|
878 |
}
|
879 |
)
|
880 |
except Exception as e:
|