Compare commits

...

2 Commits

Author SHA1 Message Date
bafe53e3a5 Cleanup cmd options 2023-09-14 10:28:14 -04:00
5aa80c6fc9 Catch missing imports 2023-09-14 10:28:00 -04:00
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,11 @@
import yt_dlp as yt
from plyer import notification
try:
import yt_dlp as yt
from plyer import notification
except:
import os
script_dir = os.path.dirname(os.path.realpath(__file__))
print("Please install dependances.\n" +
"This can be done with the command 'pip3 install -r " + script_dir + "/requierments.txt'")
def get(yt_url):
ytdl_options = {

View File

@ -9,7 +9,7 @@ help_epilog = ("This script is very dependent on yt-dlp.\n"+
cmd_option_set = argparse.ArgumentParser(description='Backup YouTube channels.', epilog=help_epilog)
cmd_option_set.add_argument('--version', '-v', dest='print_version', action='store_true', help='Print the current version number.')
cmd_option_set.add_argument(dest='url_to_convert', help="The URL of the YouTube video you're converting to a local mp3.")
cmd_option_set.add_argument(dest='url_to_convert', default='', metavar="YT URL", nargs=argparse.REMAINDER, help="The URL of the YouTube video you're converting to a local mp3.")
cmd_options = cmd_option_set.parse_args()
if (cmd_options.print_version):