Spaces:
Running
Running
Commit
·
78eef42
1
Parent(s):
cb26056
Update routes/ytApi/getPreview.py
Browse files
routes/ytApi/getPreview.py
CHANGED
@@ -16,8 +16,8 @@ def getPreview(request):
|
|
16 |
error_code = answer['ytdlp-code']
|
17 |
|
18 |
try:
|
19 |
-
if request.method == 'POST': duration = request.form['duration']
|
20 |
-
else: duration = request.args['duration']
|
21 |
if duration >= 60: duration = 60
|
22 |
except Exception as e:
|
23 |
print(e)
|
|
|
16 |
error_code = answer['ytdlp-code']
|
17 |
|
18 |
try:
|
19 |
+
if request.method == 'POST': duration = int(request.form['duration'])
|
20 |
+
else: duration = int(request.args['duration'])
|
21 |
if duration >= 60: duration = 60
|
22 |
except Exception as e:
|
23 |
print(e)
|