format import code,

master
Max 2023-09-21 09:47:41 +08:00 committed by GitHub
parent de51d2dd0a
commit 35b1618d1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 16 deletions

View File

@ -1,12 +1,10 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
#encoding=utf-8 #encoding=utf-8
# 'seleniumwire' and 'selenium 4' raise error when running python 2.x
# PS: python 2.x will be removed in future.
try: try:
# for Python2 # for Python2
from Tkinter import *
import ttk
import tkMessageBox as messagebox import tkMessageBox as messagebox
import ttk
from Tkinter import *
except ImportError: except ImportError:
# for Python3 # for Python3
from tkinter import * from tkinter import *
@ -14,27 +12,29 @@ except ImportError:
import tkinter.font as tkfont import tkinter.font as tkfont
from tkinter import messagebox from tkinter import messagebox
from tkinter.filedialog import asksaveasfilename from tkinter.filedialog import asksaveasfilename
import os
import sys
import platform
import webbrowser
import pyperclip
import base64 import base64
import time
import threading
import subprocess
import json import json
import os
import platform
import socket import socket
import subprocess
import requests import sys
import threading
import time
import warnings import warnings
import webbrowser
import pyperclip
import requests
from urllib3.exceptions import InsecureRequestWarning from urllib3.exceptions import InsecureRequestWarning
warnings.simplefilter('ignore',InsecureRequestWarning) warnings.simplefilter('ignore',InsecureRequestWarning)
import ssl import ssl
ssl._create_default_https_context = ssl._create_unverified_context ssl._create_default_https_context = ssl._create_unverified_context
CONST_APP_VERSION = "MaxBot (2023.09.01)" CONST_APP_VERSION = "MaxBot (2023.09.02)"
CONST_MAXBOT_CONFIG_FILE = "settings.json" CONST_MAXBOT_CONFIG_FILE = "settings.json"
CONST_MAXBOT_LAST_URL_FILE = "MAXBOT_LAST_URL.txt" CONST_MAXBOT_LAST_URL_FILE = "MAXBOT_LAST_URL.txt"
@ -69,6 +69,7 @@ CONST_OCR_CAPTCH_IMAGE_SOURCE_CANVAS = "canvas"
CONST_WEBDRIVER_TYPE_SELENIUM = "selenium" CONST_WEBDRIVER_TYPE_SELENIUM = "selenium"
#CONST_WEBDRIVER_TYPE_STEALTH = "stealth" #CONST_WEBDRIVER_TYPE_STEALTH = "stealth"
CONST_WEBDRIVER_TYPE_UC = "undetected_chromedriver" CONST_WEBDRIVER_TYPE_UC = "undetected_chromedriver"
#CONST_WEBDRIVER_TYPE_DP = "DrissionPage"
CONST_SUPPORTED_SITES = ["https://kktix.com" CONST_SUPPORTED_SITES = ["https://kktix.com"
,"https://tixcraft.com (拓元)" ,"https://tixcraft.com (拓元)"