From b75055e076b5918f2f59c84c9f49841c7375c5da Mon Sep 17 00:00:00 2001 From: feder-cr <85809106+feder-cr@users.noreply.github.com> Date: Fri, 13 Sep 2024 18:20:04 +0200 Subject: [PATCH] little fix --- .gitignore | 4 +++- src/utils.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1ac6fe6..74ef2bc 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,9 @@ share/python-wheels/ .installed.cfg *.egg MANIFEST - +chrome_profile/* +data_folder/* +answers.json # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. diff --git a/src/utils.py b/src/utils.py index 587e7a2..3d9021c 100644 --- a/src/utils.py +++ b/src/utils.py @@ -66,7 +66,7 @@ def scroll_slow(driver, scrollable_element, start=0, end=3600, step=300, reverse raise ValueError("Step cannot be zero.") max_scroll_height = int(scrollable_element.get_attribute("scrollHeight")) - current_scroll_position = int(scrollable_element.get_attribute("scrollTop")) + current_scroll_position = int(float(scrollable_element.get_attribute("scrollTop"))) logger.debug(f"Max scroll height of the element: {max_scroll_height}") logger.debug(f"Current scroll position: {current_scroll_position}")