Update app.py
Browse files
app.py
CHANGED
|
@@ -274,12 +274,12 @@ def process_url(title: str) -> str:
|
|
| 274 |
for row in rows:
|
| 275 |
cols = row.find_all('td')
|
| 276 |
row_data = {
|
| 277 |
-
"
|
| 278 |
"format": cols[1].get_text() if len(cols) > 1 else "",
|
| 279 |
-
"
|
| 280 |
}
|
| 281 |
data.append(row_data)
|
| 282 |
-
return
|
| 283 |
except requests.exceptions.RequestException as e:
|
| 284 |
# Handle network-related errors
|
| 285 |
raise Exception(f"Failed to process URL: {str(e)}")
|
|
|
|
| 274 |
for row in rows:
|
| 275 |
cols = row.find_all('td')
|
| 276 |
row_data = {
|
| 277 |
+
"format_id": cols[0].get_text() if len(cols) > 0 else "",
|
| 278 |
"format": cols[1].get_text() if len(cols) > 1 else "",
|
| 279 |
+
"url": cols[2].find('a')['href'] if len(cols) > 2 and cols[2].find('a') else ""
|
| 280 |
}
|
| 281 |
data.append(row_data)
|
| 282 |
+
return data
|
| 283 |
except requests.exceptions.RequestException as e:
|
| 284 |
# Handle network-related errors
|
| 285 |
raise Exception(f"Failed to process URL: {str(e)}")
|