728x90
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from webdriver_manager.chrome import ChromeDriverManager
options = webdriver.ChromeOptions()
options.add_argument("--disable-extensions")
options.add_argument("--disable-gpu")
options.add_argument("--disable-infobars")
options.add_argument("--disable-notifications")
options.add_argument("--disable-popup-blocking")
options.add_argument("--disable-web-security")
options.add_argument("--start-maximized")
options.add_argument("--ignore-certificate-errors")
options.add_argument("--no-sandbox")
options.add_argument("--headless")
driver = webdriver.Chrome(options=options)
webdriver = webdriver.Chrome(ChromeDriverManager().install(), options=options)
#...
These options disable various features in Chrome that can slow down page loading, such as extensions, notifications, and popup blocking. The --headless option runs Chrome in a headless mode, which means it runs in the background without opening a graphical user interface, which can also speed up page loading. Note that some of these options may not be suitable for all use cases and may affect the stability and security of your test environment.
Keep in mind that page loading time is also influenced by factors outside of the control of the web driver, such as the speed of the network connection, the size and complexity of the page, and the load on the server hosting the page.
728x90
'Data Science > Python' 카테고리의 다른 글
[Image Analysis] Completely Black or White Image Detection (0) | 2023.07.27 |
---|---|
[Python] Transfer Pandas Dataframe to MYSQL database with SSH (0) | 2023.02.22 |
[python] Dask Parallel Computing Example (0) | 2023.01.28 |
[python] About Dask (0) | 2023.01.28 |
[Python] How to Async Http Request : 비동기 HTTP 요청 방법 (0) | 2022.09.30 |
최근댓글