MCPcopy
hub / github.com/ScrapeGraphAI/Scrapegraph-ai / scrape

Method scrape

scrapegraphai/docloaders/chromium.py:75–84  ·  view source on GitHub ↗
(self, url: str)

Source from the content-addressed store, hash-verified

73 self.timeout = kwargs.get("timeout", timeout)
74
75 async def scrape(self, url: str) -> str:
76 if self.backend == "playwright":
77 return await self.ascrape_playwright(url)
78 elif self.backend == "selenium":
79 try:
80 return await self.ascrape_undetected_chromedriver(url)
81 except Exception as e:
82 raise ValueError(f"Failed to scrape with undetected chromedriver: {e}")
83 else:
84 raise ValueError(f"Unsupported backend: {self.backend}")
85
86 async def ascrape_undetected_chromedriver(self, url: str) -> str:
87 """

Calls 2

ascrape_playwrightMethod · 0.95