Catch missing imports

This commit is contained in:
20xd6 2023-09-14 10:28:00 -04:00
parent 35223a70b0
commit 5aa80c6fc9

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 = {