logger.info("Content scraped")
            except Exception as e:
                results = f"Error: {e}"
            await browser.close()
        return results
[docs]    def lazy_load(self) -> Iterator[Document]:
        """
        Lazily load text content from the provided URLs.
        This method yields Documents one at a time as they're scraped,
        instead of waiting to scrape all URLs before returning.
        Yields:
            Document: The scraped content encapsulated within a Document object.
        """
        for url in self.urls:
            html_content = asyncio.run(self.ascrape_playwright(url))
            metadata = {"source": url}
            yield Document(page_content=html_content, metadata=metadata)
[docs]    def load(self) -> List[Document]:
        """
        Load and return all Documents from the provided URLs.
        Returns:
            List[Document]: A list of Document objects
            containing the scraped content from each URL.
        """
        return list(self.lazy_load())