Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -384,14 +384,14 @@ async def hapyymod(q):
|
|
384 |
res.append({"title": title, "link": link, "thumb": thumb})
|
385 |
return {"status": 200, "creator": "@xtdevs", "result": res}
|
386 |
|
387 |
-
|
388 |
-
images =
|
389 |
data = []
|
390 |
for image in images:
|
391 |
-
data.append(
|
392 |
return data
|
393 |
|
394 |
-
def
|
395 |
response = requests.get(url)
|
396 |
response.raise_for_status()
|
397 |
soup = BeautifulSoup(response.text, "html.parser")
|
@@ -408,7 +408,7 @@ def scraper_pornowhite(url):
|
|
408 |
"url": data[6] if len(data) > 6 else None,
|
409 |
}
|
410 |
|
411 |
-
def
|
412 |
url = f"https://www.pornwhite.com/search/?q={query}"
|
413 |
response = requests.get(url)
|
414 |
response.raise_for_status()
|
@@ -450,9 +450,9 @@ async def pornpics(query: str):
|
|
450 |
)
|
451 |
|
452 |
@app.get("/akeno/pornowhite", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
|
453 |
-
async def
|
454 |
try:
|
455 |
-
response =
|
456 |
return SuccessResponse(
|
457 |
status="True",
|
458 |
randydev={"results": response}
|
|
|
384 |
res.append({"title": title, "link": link, "thumb": thumb})
|
385 |
return {"status": 200, "creator": "@xtdevs", "result": res}
|
386 |
|
387 |
+
def search_pornwhite_videos(query):
|
388 |
+
images = _search_porn(query)
|
389 |
data = []
|
390 |
for image in images:
|
391 |
+
data.append(_scraper_porn(image))
|
392 |
return data
|
393 |
|
394 |
+
def _scraper_porn(url):
|
395 |
response = requests.get(url)
|
396 |
response.raise_for_status()
|
397 |
soup = BeautifulSoup(response.text, "html.parser")
|
|
|
408 |
"url": data[6] if len(data) > 6 else None,
|
409 |
}
|
410 |
|
411 |
+
def _search_porn(query):
|
412 |
url = f"https://www.pornwhite.com/search/?q={query}"
|
413 |
response = requests.get(url)
|
414 |
response.raise_for_status()
|
|
|
450 |
)
|
451 |
|
452 |
@app.get("/akeno/pornowhite", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
|
453 |
+
async def pornowhite_(query: str):
|
454 |
try:
|
455 |
+
response = search_porn_videos(query)
|
456 |
return SuccessResponse(
|
457 |
status="True",
|
458 |
randydev={"results": response}
|