File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,11 @@ install_requires =
22
22
requests>=2.0.0
23
23
beautifulsoup4>=4.0.0
24
24
yt-dlp>=2021.12.27
25
- pdfkit>=0.6.0
26
25
tqdm>=4.0.0
27
26
28
27
[options.extras_require]
28
+ quiz =
29
+ pdfkit>=0.6.0
29
30
keyring =
30
31
secretstorage>=3.1.0
31
32
test =
Original file line number Diff line number Diff line change 19
19
from time import sleep
20
20
from typing import TYPE_CHECKING , List
21
21
22
- import pdfkit
22
+ try :
23
+ import pdfkit
24
+ except ImportError :
25
+ pdfkit = None
26
+
23
27
import requests
24
28
import yt_dlp
25
29
from bs4 import BeautifulSoup as bs
@@ -1237,6 +1241,10 @@ def main():
1237
1241
1238
1242
logging .basicConfig (level = args .loglevel )
1239
1243
1244
+ if pdfkit is None and config ["used_modules" ]["url" ]["quiz" ]:
1245
+ config ["used_modules" ]["url" ]["quiz" ] = False
1246
+ logger .warning ("pdfkit is not installed. Quiz-PDFs are NOT generated" )
1247
+
1240
1248
if not shutil .which ("wkhtmltopdf" ) and config ["used_modules" ]["url" ]["quiz" ]:
1241
1249
config ["used_modules" ]["url" ]["quiz" ] = False
1242
1250
logger .warning (
You can’t perform that action at this time.
0 commit comments