Update app.py
Browse files
app.py
CHANGED
@@ -254,7 +254,7 @@ async def get_track_download_url(video_url: str) -> str:
|
|
254 |
|
255 |
|
256 |
|
257 |
-
|
258 |
try:
|
259 |
# Step 1: Download the URL
|
260 |
api_url = f"https://www.saveporn.net/download/{title}/"
|
@@ -266,7 +266,7 @@ async def process_url(title: str) -> str:
|
|
266 |
|
267 |
# Check if the request was successful
|
268 |
response.raise_for_status()
|
269 |
-
soup = BeautifulSoup(response, 'html.parser')
|
270 |
table = soup.find('table')
|
271 |
data = []
|
272 |
if table:
|
@@ -325,7 +325,7 @@ def extract_video_info(video_url: str) -> str:
|
|
325 |
# Replace spaces with hyphens
|
326 |
title = title.strip().replace(' ', '-')
|
327 |
logger.info(title)
|
328 |
-
p_result =
|
329 |
return p_result
|
330 |
else:
|
331 |
return result
|
|
|
254 |
|
255 |
|
256 |
|
257 |
+
def process_url(title: str) -> str:
|
258 |
try:
|
259 |
# Step 1: Download the URL
|
260 |
api_url = f"https://www.saveporn.net/download/{title}/"
|
|
|
266 |
|
267 |
# Check if the request was successful
|
268 |
response.raise_for_status()
|
269 |
+
soup = BeautifulSoup(response.text, 'html.parser')
|
270 |
table = soup.find('table')
|
271 |
data = []
|
272 |
if table:
|
|
|
325 |
# Replace spaces with hyphens
|
326 |
title = title.strip().replace(' ', '-')
|
327 |
logger.info(title)
|
328 |
+
p_result = process_url(title)
|
329 |
return p_result
|
330 |
else:
|
331 |
return result
|