Update 3.4.3

This commit is contained in:
Yoshiko2
2020-06-14 22:54:52 +08:00
committed by GitHub
parent 107a83e62a
commit 562f030c3c
4 changed files with 236 additions and 15 deletions

View File

@@ -1,25 +1,20 @@
import argparse
from core import *
import os
from number_parser import get_number
def check_update(local_version):
data = json.loads(get_html("https://api.github.com/repos/yoshiko2/AV_Data_Capture/releases/latest"))
try:
remote = float(data["tag_name"])
local = float(local_version)
except:
print("[-] Check update failed! Skipped.")
return
remote = data["tag_name"]
local = local_version
download_url = data["html_url"]
if local < remote:
if not local == remote:
line1 = "* New update " + str(remote) + " *"
print("[*]" + line1.center(54))
print("[*]" + "↓ Download ↓".center(54))
print("[*] " + download_url)
print("[*] https://github.com/yoshiko2/AV_Data_Capture/releases")
print("[*]======================================================")
@@ -91,7 +86,7 @@ def create_data_and_move(file_path: str, c: config.Config):
if __name__ == '__main__':
version = '3.4.2'
version = '3.4.3'
# Parse command line args
single_file_path, config_file, auto_exit = argparse_function()
@@ -136,5 +131,5 @@ if __name__ == '__main__':
CEF(conf.failed_folder())
print("[+]All finished!!!")
if auto_exit:
exit(0)
os._exit(0)
input("[+][+]Press enter key exit, you can check the error message before you exit.")