mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 11:14:59 +00:00
defer import of httpx
This commit is contained in:
parent
5e0ff7627e
commit
2dc6735ab4
3 changed files with 6 additions and 3 deletions
|
@ -3,7 +3,6 @@
|
|||
import re
|
||||
import sys
|
||||
|
||||
import httpx
|
||||
import playwright
|
||||
import pypandoc
|
||||
from bs4 import BeautifulSoup
|
||||
|
@ -111,6 +110,8 @@ class Scraper:
|
|||
return PLAYWRIGHT_INFO
|
||||
|
||||
def scrape_with_httpx(self, url):
|
||||
import httpx
|
||||
|
||||
headers = {"User-Agent": f"Mozilla./5.0 ({aider_user_agent})"}
|
||||
try:
|
||||
with httpx.Client(headers=headers) as client:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue