From ac7270d57a3e2daa891b23e5407cfe05f179e97f Mon Sep 17 00:00:00 2001 From: ARC-MX Date: Thu, 6 Jun 2024 17:00:19 +0800 Subject: [PATCH] Add more detailed logs --- scripts/data_fetcher.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/data_fetcher.py b/scripts/data_fetcher.py index 891a408..f8e914d 100644 --- a/scripts/data_fetcher.py +++ b/scripts/data_fetcher.py @@ -301,16 +301,21 @@ def _get_webdriver(self): def _login(self, driver): driver.get(LOGIN_URL) + logging.info("Open LOGIN_URL:{LOGIN_URL}.\r") time.sleep(self.RETRY_WAIT_TIME_OFFSET_UNIT) # swtich to username-password login page driver.find_element(By.CLASS_NAME, "user").click() + logging.info("find_element user.\r") time.sleep(self.RETRY_WAIT_TIME_OFFSET_UNIT) # input username and password input_elements = driver.find_elements(By.CLASS_NAME, "el-input__inner") input_elements[0].send_keys(self._username) + logging.info("input_elements username :{self._username}.\r") input_elements[1].send_keys(self._password) + logging.info("input_elements password :{self._password}.\r") # click agree button self._click_button(driver, By.XPATH, '//*[@id="login_box"]/div[2]/div[1]/form/div[1]/div[3]/div/span[2]') + logging.info("Click the Agree option.\r") time.sleep(self.RETRY_WAIT_TIME_OFFSET_UNIT) # click login button self._click_button(driver, By.CLASS_NAME, "el-button.el-button--primary")