diff options
Diffstat (limited to '')
-rwxr-xr-x | later | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -87,9 +87,12 @@ class TitleMap: return self.extract(key) def extract(self, key): - # Make painstakingly sure that we only do this when absolutely - # necessary: importing yt_dlp is noticeably slow :( - import yt_dlp + try: + # Make painstakingly sure that we only do this when absolutely + # necessary: importing yt_dlp is noticeably slow :( + import yt_dlp + except ModuleNotFoundError: + sys.exit("later: yt-dlp was requested, but yt_dlp python module not found") if not self.ytdl: self.ytdl = yt_dlp.YoutubeDL({"logger": YTDLPLogger()}) |