From dc4b037957167e29342538c4d4ad17a2f3140b0a Mon Sep 17 00:00:00 2001 From: Youngwook Kim Date: Tue, 8 Aug 2023 23:31:27 +0900 Subject: [PATCH] docs(url_playwright): update docstrings for sync_evaluate_page and async_evaluate_page methods --- .../document_loaders/url_playwright.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/libs/langchain/langchain/document_loaders/url_playwright.py b/libs/langchain/langchain/document_loaders/url_playwright.py index 1c02ac30bb..188b7f22fe 100644 --- a/libs/langchain/langchain/document_loaders/url_playwright.py +++ b/libs/langchain/langchain/document_loaders/url_playwright.py @@ -49,8 +49,13 @@ class PlaywrightURLLoader(BaseLoader): self.remove_selectors = remove_selectors def sync_evaluate_page(self, page): - """Process a page and return the text content. - This method can be overridden to apply custom logic. + """Process a page and return the text content synchronously. + + Args: + page: The page to process. + + Returns: + text: The text content of the page. """ for selector in self.remove_selectors or []: elements = page.locator(selector).all() @@ -64,8 +69,13 @@ class PlaywrightURLLoader(BaseLoader): return text async def async_evaluate_page(self, page): - """Process a page asynchronously and return the text content. - This method can be overridden to apply custom logic. + """Process a page and return the text content asynchronously. + + Args: + page: The page to process. + + Returns: + text: The text content of the page. """ for selector in self.remove_selectors or []: elements = await page.locator(selector).all()