mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 22:14:28 +01:00
cleanup
This commit is contained in:
@@ -3,8 +3,7 @@ FROM python:3.11-slim
|
||||
|
||||
# Install git
|
||||
RUN apt-get -y update
|
||||
RUN apt-get -y install git
|
||||
RUN apt-get install -y libglib2.0 libnss3 libgconf-2-4 libfontconfig1 chromium-driver
|
||||
RUN apt-get -y install git chromium-driver
|
||||
|
||||
# Set environment variables
|
||||
ENV PIP_NO_CACHE_DIR=yes \
|
||||
|
||||
@@ -64,6 +64,12 @@ def scrape_text_with_selenium(url: str) -> Tuple[WebDriver, str]:
|
||||
options.add_argument(
|
||||
"user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.5615.49 Safari/537.36"
|
||||
)
|
||||
options.add_argument(
|
||||
'--no-sandbox'
|
||||
)
|
||||
options.add_argument(
|
||||
'--headless'
|
||||
)
|
||||
|
||||
if CFG.selenium_web_browser == "firefox":
|
||||
driver = webdriver.Firefox(
|
||||
@@ -74,10 +80,6 @@ def scrape_text_with_selenium(url: str) -> Tuple[WebDriver, str]:
|
||||
# See https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari
|
||||
driver = webdriver.Safari(options=options)
|
||||
else:
|
||||
options.add_argument('--no-sandbox')
|
||||
options.add_argument('--window-size=1420,1080')
|
||||
options.add_argument('--headless')
|
||||
options.add_argument('--disable-gpu')
|
||||
driver = webdriver.Chrome(
|
||||
executable_path=ChromeDriverManager().install(), options=options
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user