fix not able to auto-reload bug.

master
CHUN YU YAO 2020-10-24 11:22:14 +08:00
parent 6e2a31eadb
commit 4f53eb43e5
2 changed files with 9 additions and 4 deletions

View File

@ -44,7 +44,7 @@ warnings.simplefilter('ignore',InsecureRequestWarning)
#附註1沒有寫的很好很多地方應該可以模組化。 #附註1沒有寫的很好很多地方應該可以模組化。
#附註2 #附註2
CONST_APP_VERSION = u"MaxBot (2020.10.20)" CONST_APP_VERSION = u"MaxBot (2020.10.24)"
CONST_FROM_TOP_TO_BOTTOM = u"from top to bottom" CONST_FROM_TOP_TO_BOTTOM = u"from top to bottom"
CONST_FROM_BOTTOM_TO_TOP = u"from bottom to top" CONST_FROM_BOTTOM_TO_TOP = u"from bottom to top"
@ -1564,10 +1564,13 @@ def kktix_check_register_status(url):
if len(event_code) > 0: if len(event_code) > 0:
is_match_event_code = True is_match_event_code = True
#print('event_code:',event_code) #print('event_code:',event_code)
break
html_result = None html_result = None
if is_match_event_code: if is_match_event_code:
url = 'https://kktix.com/g/events/%s/register_info' % event_code url = "https://kktix.com/g/events/%s/register_info" % (event_code)
#print('event_code:',event_code)
#print("url:", url)
user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36' user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36'
headers = {"Accept-Language": "zh-TW,zh;q=0.5", 'User-Agent': user_agent} headers = {"Accept-Language": "zh-TW,zh;q=0.5", 'User-Agent': user_agent}
@ -1582,6 +1585,7 @@ def kktix_check_register_status(url):
registerStatus = None registerStatus = None
if not html_result is None: if not html_result is None:
status_code = html_result.status_code status_code = html_result.status_code
#print("status_code:",status_code)
if status_code == 200: if status_code == 200:
html_text = html_result.text html_text = html_result.text
@ -1597,6 +1601,7 @@ def kktix_check_register_status(url):
print(exc) print(exc)
pass pass
#print("registerStatus:", registerStatus)
return registerStatus return registerStatus
def kktix_reg_new_main(url, answer_index, registrationsNewApp_div, is_finish_checkbox_click): def kktix_reg_new_main(url, answer_index, registrationsNewApp_div, is_finish_checkbox_click):

View File

@ -16,7 +16,7 @@ import os
import sys import sys
import json import json
CONST_APP_VERSION = u"MaxBot (2020.10.20)" CONST_APP_VERSION = u"MaxBot (2020.10.24)"
CONST_FROM_TOP_TO_BOTTOM = u"from top to bottom" CONST_FROM_TOP_TO_BOTTOM = u"from top to bottom"
CONST_FROM_BOTTOM_TO_TOP = u"from bottom to top" CONST_FROM_BOTTOM_TO_TOP = u"from bottom to top"