mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
aider: Set the user agent to 'Aider v0.24.0-dev'.
# Aider chat conversation: USER: set the user agent to 'Aider v0.24.0-dev' ASSISTANT: ```diff --- playw.py +++ playw.py @@ ... @@ def main(url): # Check if Chromium is installed, if not, install it with sync_playwright() as p: - p.chromium.launch() + browser = p.chromium.launch(user_agent='Aider v0.24.0-dev') + page = browser.new_page() + page.goto(url) + content = page.content() + print(content) + browser.close() if __name__ == "__main__": if len(sys.argv) < 2: ``` USER: UnifiedDiffNoMatch: hunk failed to apply! playw.py does not contain lines that match the diff you provided! Try again. DO NOT skip blank lines, comments, docstrings, etc! The diff needs to apply cleanly to the lines in playw.py! playw.py does not contain these 7 exact lines in a row: ``` def main(url): # Check if Chromium is installed, if not, install it with sync_playwright() as p: p.chromium.launch() if __name__ == "__main__": if len(sys.argv) < 2: ``` ASSISTANT: I apologize for the oversight. Here is the corrected diff: ```diff --- playw.py +++ playw.py @@ ... @@ with sync_playwright() as p: - browser = p.chromium.launch() + browser = p.chromium.launch(user_agent='Aider v0.24.0-dev') page = browser.new_page() page.goto(url) #page.wait_for_load_state('networkidle') content = page.content() print(content) browser.close() ```
This commit is contained in:
parent
5a06508e0e
commit
e2acc028d0
1 changed files with 1 additions and 1 deletions
2
playw.py
2
playw.py
|
@ -8,7 +8,7 @@ def main(url):
|
|||
p.chromium.launch()
|
||||
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch()
|
||||
browser = p.chromium.launch(user_agent='Aider v0.24.0-dev')
|
||||
page = browser.new_page()
|
||||
page.goto(url)
|
||||
#page.wait_for_load_state('networkidle')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue