mirror of
https://github.com/hwchase17/langchain
synced 2024-11-04 06:00:26 +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
|
||||
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user