diff --git a/README.md b/README.md index 3222ec6..7c8dd80 100644 --- a/README.md +++ b/README.md @@ -122,11 +122,15 @@ options: ### Build ->docker build -f ci/docker/Dockerfile -t wbmbot_v2 . +```bash +docker build -f ci/docker/Dockerfile -t wbmbot_v2 . +``` ### Pull ->docker pull vel7an/wbmbot_v2:latest +```bash +docker pull vel7an/wbmbot_v2:latest +``` ### Run @@ -171,7 +175,7 @@ As of now, there are no timeouts, bot checks, or captchas on the website (which - [ ] Make a portable docker image of the bot that can be hosted anywhere - [ ] Add "excluded_applications.json" that shows all applications that were excluded by the filter - [X] Add color_printer class into the works with the logger -- [ ] Notify via e-mail whenever the bot applies to an application +- [X] Notify via e-mail whenever the bot applies to an application - [X] Download the 'Angebote' page as an HTML for records keeping - [X] Download the viewing of an apartment as a PDF (Available on WBM) for records keeping - [ ] Automatically detect if internet network connection is down and pause/restart once back diff --git a/wbmbot_v2/helpers/webDriverOperations.py b/wbmbot_v2/helpers/webDriverOperations.py index c77e305..12b795b 100644 --- a/wbmbot_v2/helpers/webDriverOperations.py +++ b/wbmbot_v2/helpers/webDriverOperations.py @@ -5,9 +5,11 @@ from helpers import constants, notifications from httpsWrapper import httpPageDownloader as hpd from logger import wbm_logger -from selenium.common.exceptions import (NoSuchElementException, - StaleElementReferenceException, - TimeoutException) +from selenium.common.exceptions import ( + NoSuchElementException, + StaleElementReferenceException, + TimeoutException, +) from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait @@ -273,11 +275,9 @@ def close_live_chat_button(web_driver): # Click the 'Close Live Chat' button web_driver.find_element(By.XPATH, close_button_xpath).click() - LOG.info(color_me.green("Live Chat dialog has been closed.")) return True except TimeoutException as e: # If the Close Live Chat does not appear within the timeout, log a message - LOG.warning(color_me.yellow("No Live Chat dialog appeared within the timeout.")) return False