2023-11-02, update for ticketmaster.sg

master
CHUN YU YAO 2023-11-04 01:59:08 +08:00
parent 40f021ff9c
commit 3aa3f79605
4 changed files with 17 additions and 5 deletions

View File

@ -55,7 +55,7 @@ import webbrowser
import chromedriver_autoinstaller import chromedriver_autoinstaller
CONST_APP_VERSION = "MaxBot (2023.11.01)" CONST_APP_VERSION = "MaxBot (2023.11.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"
@ -780,7 +780,19 @@ def get_driver_by_config(config_dict):
print("create web driver object fail @_@;") print("create web driver object fail @_@;")
else: else:
try: try:
NETWORK_BLOCKED_URLS = ['*woff2','*woff','*google-analytics.*','*googletagmanager.*','*googletagservices.*','*youtube.com*','*player.youku.*','*e2elog.fetnet.net*'] NETWORK_BLOCKED_URLS = ['*/adblock.js'
,'*google-analytics.*'
,'*googletagmanager.*'
,'*googletagservices.*'
,'*play.google.com/*'
,'*.doubleclick.net/*'
,'*.rollbar.com/*'
,'*.cloudfront.com/*'
,'*.lndata.com/*'
,'*twitter.com/i/*'
,'*youtube.com*'
,'*player.youku.*'
,'*e2elog.fetnet.net*']
driver.execute_cdp_cmd('Network.setBlockedURLs', {"urls": NETWORK_BLOCKED_URLS}) driver.execute_cdp_cmd('Network.setBlockedURLs', {"urls": NETWORK_BLOCKED_URLS})
driver.execute_cdp_cmd('Network.enable', {}) driver.execute_cdp_cmd('Network.enable', {})
if 'kktix.c' in homepage: if 'kktix.c' in homepage:

View File

@ -22,7 +22,7 @@ import sys
import threading import threading
import webbrowser import webbrowser
CONST_APP_VERSION = "MaxBot (2023.10.23)" CONST_APP_VERSION = "MaxBot (2023.11.02)"
CONST_MAXBOT_LAUNCHER_FILE = "config_launcher.json" CONST_MAXBOT_LAUNCHER_FILE = "config_launcher.json"
CONST_MAXBOT_CONFIG_FILE = "settings.json" CONST_MAXBOT_CONFIG_FILE = "settings.json"

View File

@ -34,7 +34,7 @@ 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.11.01)" CONST_APP_VERSION = "MaxBot (2023.11.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"

View File

@ -27,7 +27,7 @@ import pyperclip
import tornado import tornado
from tornado.web import Application from tornado.web import Application
CONST_APP_VERSION = "MaxBot (2023.10.23)" CONST_APP_VERSION = "MaxBot (2023.11.02)"
CONST_MAXBOT_QUESTION_FILE = "MAXBOT_QUESTION.txt" CONST_MAXBOT_QUESTION_FILE = "MAXBOT_QUESTION.txt"