diff --git a/Dockerfile b/Dockerfile index ec8df5d..77f7a92 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,9 +7,9 @@ RUN wget -q https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVE && tar xvf $GECKODRIVER_FILENAME \ && rm $GECKODRIVER_FILENAME -FROM python:3.11-slim-bullseye as final +FROM python:3.11-slim-bookworm as final RUN apt-get update && apt-get install -y firefox-esr COPY --from=downloader /app/geckodriver /usr/local/bin/geckodriver ARG OFX_VERSION -RUN pip install ofx-processor==$OFX_VERSION +RUN pip --disable-pip-version-check install ofx-processor==$OFX_VERSION CMD ["ynab", "lcl", "--download"] diff --git a/error_download_lcl.png b/error_download_lcl.png new file mode 100644 index 0000000..2c2ab6e Binary files /dev/null and b/error_download_lcl.png differ diff --git a/ofx_processor/downloaders/lcl.py b/ofx_processor/downloaders/lcl.py index d71f6ba..9dedb58 100644 --- a/ofx_processor/downloaders/lcl.py +++ b/ofx_processor/downloaders/lcl.py @@ -62,13 +62,15 @@ class LclDownloader: self._click(By.CLASS_NAME, "app-cta-button") click.secho("Logged in!", fg="green") - time.sleep(2) - try: - self._click(By.CSS_SELECTOR, ".app-cta-button--primary") - click.secho("Dismissing welcome screen...", fg="blue") - time.sleep(2) - except NoSuchElementException: - click.secho("No welcome screen found.", fg="blue") + retry = True + while retry: + try: + self._click(By.CSS_SELECTOR, ".app-cta-button--primary") + click.secho("Dismissing welcome screen...", fg="blue") + time.sleep(1) + except NoSuchElementException: + click.secho("No welcome screen found.", fg="blue") + retry = False try: self._click(By.CSS_SELECTOR, ".burger-menu-content") diff --git a/pyproject.toml b/pyproject.toml index 6344bb5..0db5d10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ofx-processor" -version = "4.4.5" +version = "4.4.6" description = "Personal ofx processor" readme = "README.md" authors = ["Gabriel Augendre "]