From fcf52fd3929aa680ac9a83f4c04d232049499b7d Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 20 Oct 2024 14:16:06 -0700 Subject: [PATCH] [FIX] update dependencies and increase dom loading time --- .github/workflows/publish-to-test-pypi.yml | 2 +- facebook_page_info_scraper/facebook_page_info_scraper.py | 4 ++-- setup.cfg | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index 24df733..ff1b8e2 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -30,7 +30,7 @@ jobs: publish-to-pypi: name: >- Publish Python 🐍 distribution 📦 to PyPI - #if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes needs: - build runs-on: ubuntu-latest diff --git a/facebook_page_info_scraper/facebook_page_info_scraper.py b/facebook_page_info_scraper/facebook_page_info_scraper.py index 1526b70..3ad4f53 100644 --- a/facebook_page_info_scraper/facebook_page_info_scraper.py +++ b/facebook_page_info_scraper/facebook_page_info_scraper.py @@ -87,7 +87,7 @@ def __private_fetch_page_name(self) -> str | None: def __private_fetch_basic_info_web_element(self) -> WebElement | None: - WebDriverWait(self.driver, 3).until( + WebDriverWait(self.driver, 5).until( EC.presence_of_element_located((By.TAG_NAME, 'body')) ) try: @@ -103,7 +103,7 @@ def __private_fetch_basic_info_web_element(self) -> WebElement | None: # fetch css layout 1 or 2 def __private_fetch_css_layout(self): self.driver.get(self.__private_clean(self.link)) - WebDriverWait(self.driver, 3).until( + WebDriverWait(self.driver, 5).until( EC.presence_of_element_located((By.TAG_NAME, 'body')) ) try: diff --git a/setup.cfg b/setup.cfg index f217d6e..77eacf9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,5 +35,5 @@ install_requires = retry~=0.9.2 selenium~=4.8.2 googletrans~=4.0.0rc1 - + webdriver-manager~=4.0.2 python_requires = >=3.10 \ No newline at end of file