影片刮削时Ctrl+C立刻退出,而不是加入失败列表并跳到下一部影片

This commit is contained in:
lededev
2022-04-18 01:27:46 +08:00
parent 3224f8c1ab
commit 3dda5a94cf
4 changed files with 15 additions and 14 deletions

View File

@@ -467,7 +467,7 @@ def download_file_with_filename(url: str, filename: str, path: str) -> None:
os.makedirs(path)
except:
print(f"[-]Fatal error! Can not make folder '{path}'")
sys.exit(0)
os._exit(0)
proxies = configProxy.proxies()
headers = {
'User-Agent': G_USER_AGENT}
@@ -484,7 +484,7 @@ def download_file_with_filename(url: str, filename: str, path: str) -> None:
os.makedirs(path)
except:
print(f"[-]Fatal error! Can not make folder '{path}'")
sys.exit(0)
os._exit(0)
headers = {
'User-Agent': G_USER_AGENT}
r = requests.get(url, timeout=configProxy.timeout, headers=headers)