mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
aider: Set a maximum timeout of 5 seconds for page.goto
in the scrape_with_playwright
method.
# Aider chat conversation: USER: set a max timeout of 5sec for page.goto ASSISTANT: To set a maximum timeout of 5 seconds for `page.goto`, we need to modify the `scrape_with_playwright` method in `aider/scrape.py`. Here is the *SEARCH/REPLACE* block: aider/scrape.py ```python <<<<<<< SEARCH page.goto(url, wait_until="networkidle") ======= page.goto(url, wait_until="networkidle", timeout=5000) >>>>>>> REPLACE ```
This commit is contained in:
parent
337891e739
commit
4ebc35e038
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ class Scraper:
|
|||
user_agent += " " + aider_user_agent
|
||||
|
||||
page = browser.new_page(user_agent=user_agent)
|
||||
page.goto(url, wait_until="networkidle")
|
||||
page.goto(url, wait_until="networkidle", timeout=5000)
|
||||
content = page.content()
|
||||
browser.close()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue