Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,7 +21,9 @@ def get_available_formats(info_dict):
|
|
| 21 |
formats = []
|
| 22 |
for fmt in info_dict['formats']:
|
| 23 |
if fmt.get('height') and fmt.get('ext') == 'mp4':
|
| 24 |
-
|
|
|
|
|
|
|
| 25 |
return formats
|
| 26 |
|
| 27 |
if st.button('확인'):
|
|
|
|
| 21 |
formats = []
|
| 22 |
for fmt in info_dict['formats']:
|
| 23 |
if fmt.get('height') and fmt.get('ext') == 'mp4':
|
| 24 |
+
filesize = fmt.get('filesize', 0)
|
| 25 |
+
filesize_mb = round(filesize / (1024 * 1024), 2) if filesize else 'Unknown size'
|
| 26 |
+
formats.append(f"{fmt['format_id']} - {fmt['height']}p - {filesize_mb} MB")
|
| 27 |
return formats
|
| 28 |
|
| 29 |
if st.button('확인'):
|