mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-18 02:33:19 +00:00
docs(url_playwright): update docstrings for sync_evaluate_page and async_evaluate_page methods
This commit is contained in:
parent
1fa5d94591
commit
dc4b037957
@ -49,8 +49,13 @@ class PlaywrightURLLoader(BaseLoader):
|
|||||||
self.remove_selectors = remove_selectors
|
self.remove_selectors = remove_selectors
|
||||||
|
|
||||||
def sync_evaluate_page(self, page):
|
def sync_evaluate_page(self, page):
|
||||||
"""Process a page and return the text content.
|
"""Process a page and return the text content synchronously.
|
||||||
This method can be overridden to apply custom logic.
|
|
||||||
|
Args:
|
||||||
|
page: The page to process.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
text: The text content of the page.
|
||||||
"""
|
"""
|
||||||
for selector in self.remove_selectors or []:
|
for selector in self.remove_selectors or []:
|
||||||
elements = page.locator(selector).all()
|
elements = page.locator(selector).all()
|
||||||
@ -64,8 +69,13 @@ class PlaywrightURLLoader(BaseLoader):
|
|||||||
return text
|
return text
|
||||||
|
|
||||||
async def async_evaluate_page(self, page):
|
async def async_evaluate_page(self, page):
|
||||||
"""Process a page asynchronously and return the text content.
|
"""Process a page and return the text content asynchronously.
|
||||||
This method can be overridden to apply custom logic.
|
|
||||||
|
Args:
|
||||||
|
page: The page to process.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
text: The text content of the page.
|
||||||
"""
|
"""
|
||||||
for selector in self.remove_selectors or []:
|
for selector in self.remove_selectors or []:
|
||||||
elements = await page.locator(selector).all()
|
elements = await page.locator(selector).all()
|
||||||
|
Loading…
Reference in New Issue
Block a user