mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
feat: Add support for following redirects in httpx-based scraping
This commit is contained in:
parent
a77c8ccfa9
commit
3dfc63ce79
1 changed files with 1 additions and 1 deletions
|
@ -185,7 +185,7 @@ class Scraper:
|
|||
|
||||
headers = {"User-Agent": f"Mozilla./5.0 ({aider_user_agent})"}
|
||||
try:
|
||||
with httpx.Client(headers=headers, verify=self.verify_ssl) as client:
|
||||
with httpx.Client(headers=headers, verify=self.verify_ssl, follow_redirects=True) as client:
|
||||
response = client.get(url)
|
||||
response.raise_for_status()
|
||||
return response.text, response.headers.get("content-type", "").split(";")[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue