From acb5607e2cfa6b81b7146845e7ef2e9245fa2193 Mon Sep 17 00:00:00 2001 From: break27 Date: Fri, 8 May 2026 14:26:17 +0800 Subject: [PATCH] minor fix --- main.py | 12 ++++++------ requirements.txt | Bin 922 -> 922 bytes 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index e552c2b..9457837 100644 --- a/main.py +++ b/main.py @@ -205,11 +205,6 @@ def main(driver: WebDriver, logger = logging.getLogger('main')): logger.warning('Error while fetching data from %s, retrying... (%d)', url, attempt, exc_info=e) assert attempt < retry - flow = ActionFlow() - profile = None - progress = { 'task': '' } - selection = 0 - class Wait(Action): @classmethod def prepare(cls): @@ -217,8 +212,8 @@ def main(driver: WebDriver, logger = logging.getLogger('main')): @classmethod def perform(cls): - flow.do(cls) wait(1) + return True class Cancel(Action): @classmethod @@ -244,12 +239,17 @@ def main(driver: WebDriver, logger = logging.getLogger('main')): driver.switch_to.window(driver.current_window_handle) raise cls + flow = ActionFlow() flow.append(Wait) flow.allow(Wait) flow.do(Wait) flow.append(Cancel) flow.append(Skip) + profile = None + progress = { 'task': '' } + selection = 0 + jsonrpc2.define('actions', lambda: flow.capabilities()) jsonrpc2.define('cancel', lambda: flow.do(Cancel)) jsonrpc2.define('skip', lambda: flow.do(Skip)) diff --git a/requirements.txt b/requirements.txt index 82448445377b3d05496333039fe2115b28cdb9b0..8c5210ccd63f7ac3cea906213397b5b28ade72ab 100644 GIT binary patch delta 91 zcmbQmK8t1!5AoS43skms!aom drvT|hpgI$VBp_`8