mzltest commited on
Commit
95d5e18
·
1 Parent(s): 4f38701

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -84,7 +84,7 @@ def downloadTubeUpload(query):
84
  video_id = None
85
  for item in search_response:
86
  duration = item.get("duration_raw")
87
- if duration and int(duration.split(':')[0]) < 1 and int(duration.split(':')[1])<10:
88
  video_id = item.get("id", {}).get("videoId")
89
  break
90
  print('1-r',video_id)
 
84
  video_id = None
85
  for item in search_response:
86
  duration = item.get("duration_raw")
87
+ if duration and len(duration.split(':')< 3and int(duration.split(':')[1])<10:
88
  video_id = item.get("id", {}).get("videoId")
89
  break
90
  print('1-r',video_id)