Update app.py
Browse files
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 <
|
| 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,
|
| 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"])
|