Merge pull request #3 from tom-snow/patch-1

小优化,防止安装 widevine 报错
This commit is contained in:
ayasa520 authored and GitHub committed 2023-02-22 23:04:09 +08:00
commit e80314e694
1 file changed
+2 -1
+2 -1
View File
@@ -46,7 +46,8 @@ class Widevine(General):
super().download() super().download()
def copy(self): def copy(self):
shutil.rmtree("./widevine") if os.path.exists("./widevine"):
shutil.rmtree("./widevine")
run(["chmod", "+x", self.extract_to, "-R"]) run(["chmod", "+x", self.extract_to, "-R"])
print_color("Copying widevine library files ...", bcolors.GREEN) print_color("Copying widevine library files ...", bcolors.GREEN)
name = re.findall("([a-zA-Z0-9]+)\.zip", self.dl_link)[0] name = re.findall("([a-zA-Z0-9]+)\.zip", self.dl_link)[0]