langchain_community.document_loaders.url_playwright
.PlaywrightEvaluator¶
- class langchain_community.document_loaders.url_playwright.PlaywrightEvaluator[source]¶
Abstract base class for all evaluators.
Each evaluator should take a page, a browser instance, and a response object, process the page as necessary, and return the resulting text.
Methods
__init__
()evaluate
(page, browser, response)Synchronously process the page and return the resulting text.
evaluate_async
(page, browser, response)Asynchronously process the page and return the resulting text.
- __init__()¶
- abstract evaluate(page: Page, browser: Browser, response: Response) str [source]¶
Synchronously process the page and return the resulting text.
- Parameters
page – The page to process.
browser – The browser instance.
response – The response from page.goto().
- Returns
The text content of the page.
- Return type
text
- abstract async evaluate_async(page: AsyncPage, browser: AsyncBrowser, response: AsyncResponse) str [source]¶
Asynchronously process the page and return the resulting text.
- Parameters
page – The page to process.
browser – The browser instance.
response – The response from page.goto().
- Returns
The text content of the page.
- Return type
text