Last active
July 31, 2022 22:55
-
-
Save SamadiPour/ed0a7ee425663f710e4f88a28a578d60 to your computer and use it in GitHub Desktop.
Deepnote selenium example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from webdriver_manager.chrome import ChromeDriverManager | |
from webdriver_manager.utils import ChromeType | |
options = webdriver.ChromeOptions() | |
options.add_argument('--headless') | |
options.add_argument('--no-sandbox') | |
options.add_argument('--disable-dev-shm-usage') | |
options.add_argument("window-size=1920,1080") | |
options.add_argument("--enable-javascript") | |
options.add_argument( | |
'user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36' | |
) | |
driver = webdriver.Chrome(ChromeDriverManager(chrome_type=ChromeType.GOOGLE).install(), options=options) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment