Compare commits
2 commits
43b76772e1
...
c7acfcd099
Author | SHA1 | Date | |
---|---|---|---|
c7acfcd099 | |||
d8c9240808 |
3 changed files with 5 additions and 3 deletions
|
@ -1,13 +1,13 @@
|
||||||
FROM debian:bookworm AS downloader
|
FROM debian:bookworm AS downloader
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN apt-get update && apt-get install -y wget
|
RUN apt-get update && apt-get install -y wget
|
||||||
ARG GECKODRIVER_VERSION="v0.33.0"
|
ARG GECKODRIVER_VERSION="v0.35.0"
|
||||||
ARG GECKODRIVER_FILENAME="geckodriver-$GECKODRIVER_VERSION-linux64.tar.gz"
|
ARG GECKODRIVER_FILENAME="geckodriver-$GECKODRIVER_VERSION-linux64.tar.gz"
|
||||||
RUN wget -q https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/$GECKODRIVER_FILENAME \
|
RUN wget -q https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/$GECKODRIVER_FILENAME \
|
||||||
&& tar xvf $GECKODRIVER_FILENAME \
|
&& tar xvf $GECKODRIVER_FILENAME \
|
||||||
&& rm $GECKODRIVER_FILENAME
|
&& rm $GECKODRIVER_FILENAME
|
||||||
|
|
||||||
FROM python:3.11-slim-bookworm as final
|
FROM python:3.11-slim-bookworm AS final
|
||||||
RUN apt-get update && apt-get install -y firefox-esr
|
RUN apt-get update && apt-get install -y firefox-esr
|
||||||
COPY --from=downloader /app/geckodriver /usr/local/bin/geckodriver
|
COPY --from=downloader /app/geckodriver /usr/local/bin/geckodriver
|
||||||
ARG OFX_VERSION
|
ARG OFX_VERSION
|
||||||
|
|
|
@ -34,6 +34,7 @@ class LclDownloader:
|
||||||
)
|
)
|
||||||
self.selenium = webdriver.Firefox(options=options)
|
self.selenium = webdriver.Firefox(options=options)
|
||||||
self.selenium.implicitly_wait(30)
|
self.selenium.implicitly_wait(30)
|
||||||
|
self.selenium.set_window_size(1280, 4000)
|
||||||
|
|
||||||
def download(self) -> str:
|
def download(self) -> str:
|
||||||
try:
|
try:
|
||||||
|
@ -86,6 +87,7 @@ class LclDownloader:
|
||||||
|
|
||||||
self._click(By.CLASS_NAME, "download-button")
|
self._click(By.CLASS_NAME, "download-button")
|
||||||
click.secho("Found it!", fg="green")
|
click.secho("Found it!", fg="green")
|
||||||
|
time.sleep(5)
|
||||||
selenium.get("about:downloads")
|
selenium.get("about:downloads")
|
||||||
return self._get_last_download_file_name()
|
return self._get_last_download_file_name()
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "ofx-processor"
|
name = "ofx-processor"
|
||||||
version = "4.5.0"
|
version = "4.5.1"
|
||||||
description = "Personal ofx processor"
|
description = "Personal ofx processor"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = ["Gabriel Augendre <gabriel@augendre.info>"]
|
authors = ["Gabriel Augendre <gabriel@augendre.info>"]
|
||||||
|
|
Loading…
Reference in a new issue