Last active
December 28, 2022 10:48
-
-
Save matejmajny/eb46225e7e49d1b9ef14baf3eade7f04 to your computer and use it in GitHub Desktop.
small tool for downloading stuff to my vps file manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
link = input("Link: ") | |
os.chdir("/var/www/simple-file-manager/yt-videos") | |
link = link.split("/")[2] | |
if link == "www.youtu.be" or link == "www.youtube.com": | |
os.system("yt-dlp -f 'bestvideo[height<=1080]+bestaudio/best[height<=1080]' -S res,ext:mp4:m4a --recode mp4 " + link) | |
else: | |
os.system("wget " + link) | |
print("Done!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment