From 2569aa03f66abb48e348d89a37d7fbeb31adc0c1 Mon Sep 17 00:00:00 2001 From: Mort Yao Date: Sun, 23 Jun 2024 18:44:47 +0200 Subject: [PATCH] [youtube] prompt for installing dukpy if ImportError --- src/you_get/extractors/youtube.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/you_get/extractors/youtube.py b/src/you_get/extractors/youtube.py index 82d271f07d..38da668b51 100644 --- a/src/you_get/extractors/youtube.py +++ b/src/you_get/extractors/youtube.py @@ -3,7 +3,12 @@ from ..common import * from ..extractor import VideoExtractor -import dukpy +try: + import dukpy +except ImportError: + log.e('Please install dukpy in order to extract videos from YouTube:') + log.e('$ pip install dukpy') + exit(0) from urllib.parse import urlparse, parse_qs, urlencode from xml.dom.minidom import parseString