mzltest commited on
Commit
7f2f333
·
1 Parent(s): ffe2e58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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")
87
- if duration and duration < "00:10:00":
88
  video_id = item.get("id", {}).get("videoId")
89
  break
90
  print('1-r',video_id)
@@ -121,7 +121,7 @@ def split_file(file_id):
121
 
122
 
123
  query_args = {'id': file_id, 'splitter': "phoenix"}
124
- response = requests.post(url_for_split, headers=headers, data=query_args)
125
  split_result = response.json()
126
  if split_result["status"] == "error":
127
  raise RuntimeError(split_result["error"])
 
84
  video_id = None
85
  for item in search_response:
86
  duration = item.get("duration")
87
+ if duration and int(duration.split(':')[0]) < 0 and int(duration.split(':')[1])<10:
88
  video_id = item.get("id", {}).get("videoId")
89
  break
90
  print('1-r',video_id)
 
121
 
122
 
123
  query_args = {'id': file_id, 'splitter': "phoenix"}
124
+ response = requests.post(url_for_split, data=query_args)
125
  split_result = response.json()
126
  if split_result["status"] == "error":
127
  raise RuntimeError(split_result["error"])