Add web page

This commit is contained in:
Paul Gauthier 2024-04-27 15:28:08 -07:00
parent 6e5e195ea8
commit dcb6100ce9
3 changed files with 53 additions and 19 deletions

View file

@ -66,14 +66,14 @@ class Scraper:
except Exception:
self.playwright_available = False
def show_playwright_instructions(self):
def get_playwright_instructions(self):
if self.playwright_available in (True, None):
return
if self.playwright_instructions_shown:
return
self.playwright_instructions_shown = True
self.print_error(PLAYWRIGHT_INFO)
return PLAYWRIGHT_INFO
def scrape_with_httpx(self, url):
headers = {"User-Agent": f"Mozilla./5.0 ({aider_user_agent})"}