implement cancel button to cancel login profedure and continue with the

next entry
This commit is contained in:
2024-08-08 11:58:50 +02:00
parent 83e0d81ebe
commit e0e54adb5d
5 changed files with 27 additions and 26 deletions

View File

@@ -7,7 +7,7 @@ from login import *
from time import sleep
from db import *
DEBUG = False
DEBUG = True
def log(*s):
if DEBUG:
print(s)
@@ -76,16 +76,19 @@ def login_loop(config_file,gui,worker):
ret_login = 0
session = 0
while (ret != 0):
worker.dialog_rejected = False
ret = entry2 = config.readConfig(config_file,gui,worker)
print(entry2)
if(ret != 0 and ret_login != 1):
if(entry2.loginurl != 'NONE'):
session = -1
while session == -1:
log("[pre while] worker.dialog_rejected = ",worker.dialog_rejected)
while (session == -1 and worker.dialog_rejected == False):
log("worker.dialog_rejected = ",worker.dialog_rejected)
session = login(entry2)
if session == -1:
ret_login = entry2.input_pw(gui,entry2.user,worker)
choose_scraper(entry2,session)
ret_login = entry2.input_pw(gui,entry2.user,worker)
if worker.dialog_rejected == False:
choose_scraper(entry2,session)
def runner(entry,session,scrap_func,next_url_func):
i=0