lcjln commited on
Commit
e311cbc
·
verified ·
1 Parent(s): 929449f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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
- formats.append(f"{fmt['format_id']} - {fmt['height']}p")
 
 
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('확인'):