]> xmof Git - DeDRM.git/commitdiff
fix the regular expression
authorYuki Liu <yuki.liu@utexas.edu>
Fri, 15 Apr 2022 16:02:18 +0000 (11:02 -0500)
committernoDRM <no_drm123@protonmail.com>
Thu, 21 Apr 2022 12:54:17 +0000 (12:54 +0000)
DeDRM_plugin/k4mobidedrm.py

index e048a036f1664eebc0d38dc64cac590993e0759d..3ddb9e8a23c215e620f19da0310bbc9fd89dbef7 100644 (file)
@@ -275,7 +275,7 @@ def decryptBook(infile, outdir, kDatabaseFiles, androidFiles, serials, pids):
     orig_fn_root = os.path.splitext(os.path.basename(infile))[0]
     if (
         re.match('^B[A-Z0-9]{9}(_EBOK|_EBSP|_sample)?$', orig_fn_root) or
-        re.match('^{0-9A-F-}{36}$', orig_fn_root)
+        re.match('^[0-9A-F-]{36}$', orig_fn_root)
     ):  # Kindle for PC / Mac / Android / Fire / iOS
         clean_title = cleanup_name(book.getBookTitle())
         outfilename = "{}_{}".format(orig_fn_root, clean_title)