Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,12 @@ def dl(inp):
|
|
21 |
try:
|
22 |
inp_out=inp.replace("https://","")
|
23 |
inp_out=inp_out.replace("/","_").replace(".","_").replace("=","_").replace("?","_")
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
25 |
out = f"{inp_out}.mp4"
|
26 |
#out_ap = os.path.abspath(out_f)
|
27 |
#out = f'https://omnibus-reverse-image.hf.space/file={out_ap}'
|
|
|
21 |
try:
|
22 |
inp_out=inp.replace("https://","")
|
23 |
inp_out=inp_out.replace("/","_").replace(".","_").replace("=","_").replace("?","_")
|
24 |
+
if "twitter" in inp:
|
25 |
+
os.system(f'yt-dlp "{inp}" --extractor-arg "twitter:api=syndication" --trim-filenames 160 -o "{uid}/{inp_out}.mp4" -S res,mp4 --recode mp4')
|
26 |
+
else:
|
27 |
+
os.system(f'yt-dlp "{inp}" --trim-filenames 160 -o "{uid}/{inp_out}.mp4" -S res,mp4 --recode mp4')
|
28 |
+
|
29 |
+
#os.system(f'yt-dlp "{inp}" --trim-filenames 160 -o "{inp_out}.mp4" -S res,mp4 --recode mp4')
|
30 |
out = f"{inp_out}.mp4"
|
31 |
#out_ap = os.path.abspath(out_f)
|
32 |
#out = f'https://omnibus-reverse-image.hf.space/file={out_ap}'
|