Skip to content

Commit

Permalink
fix: reduce scraper page load timeout and increase retry attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
Flexicon committed Nov 11, 2024
1 parent 85b38e0 commit 3ff03c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_scraper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
MONGODB_URI: ${{ secrets.MONGODB_URI }}
with:
timeout_minutes: 1
max_attempts: 5
max_attempts: 10
retry_on: error
command: |
docker run -e DB_NAME -e MONGODB_URI \
Expand Down
2 changes: 1 addition & 1 deletion scraper/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self) -> None:
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--headless')
self.driver = webdriver.Chrome(options=chrome_options)
self.driver.set_page_load_timeout(15)
self.driver.set_page_load_timeout(10)
self.driver.implicitly_wait(5)

def fetch_content_html(self, url: str, *, selector: str = '.main') -> str:
Expand Down

0 comments on commit 3ff03c2

Please sign in to comment.