update docs for PlaywrightWrapper/SeleniumWrapper

This commit is contained in:
shenchucheng 2023-07-25 01:48:09 +08:00
parent b6542768ee
commit 8cb233ccff
2 changed files with 11 additions and 5 deletions

View file

@ -13,9 +13,10 @@ from metagpt.logs import logger
class PlaywrightWrapper:
"""Wrapper around Playwright.
To use this module, you should have the ``playwright`` Python package installed and ensure
that the required browsers are also installed. You can download the necessary browser binaries
by running the command `playwright install` for the first time.
To use this module, you should have the `playwright` Python package installed and ensure that
the required browsers are also installed. You can install playwright by running the command
`pip install metagpt[playwright]` and download the necessary browser binaries by running the
command `playwright install` for the first time."
"""
def __init__(

View file

@ -17,8 +17,13 @@ from concurrent import futures
class SeleniumWrapper:
"""Wrapper around Selenium.
To use this module, you should have the ``selenium`` Python package installed and ensure
that the required browsers are also installed.
To use this module, you should check the following:
1. Run the following command: pip install metagpt[selenium].
2. Make sure you have a compatible web browser installed and the appropriate WebDriver set up
for that browser before running. For example, if you have Mozilla Firefox installed on your
computer, you can set the configuration SELENIUM_BROWSER_TYPE to firefox. After that, you
can scrape web pages using the Selenium WebBrowserEngine.
"""
def __init__(