Note the frequently used options in Python + Selenium + Chrome

Introduction

Note the frequently used options in Python + Selenium + Chrome

Environmental information

Frequently used options in Python + Selenium + Chrome

from selenium import webdriver

options = webdriver.chrome.options.Options()
#Hide screen
options.add_argument('--headless')
#Seems essential
options.add_argument('--disable-gpu')
#Size specification
options.add_argument('--window-size=1920,1080')
#Avoiding lack of authority of container
options.add_argument('--no-sandbox')
#Do not load images
options.add_argument('--blink-settings=imagesEnabled=false')
#Disable notifications
options.add_argument('--disable-desktop-notifications')
#Disable extension
options.add_argument('--disable-extensions')
#Ignore SSL
options.add_argument('--ignore-certificate-errors')
#Disable web security
options.add_argument('--disable-web-security')

driver = webdriver.Chrome(chrome_options=options)

Recommended Posts

Note the frequently used options in Python + Selenium + Chrome
8 Frequently Used Commands in Python Django
Python + Selenium Frequently used operation method summary
[python] Frequently used techniques in machine learning
[Note] About the role of underscore "_" in Python
Python note: When the pip command cannot be used
Get the value selected in Selenium Python VBA pull-down
How to download files from Selenium in Python in Chrome
[Selenium] Open the link in a new tab and move it [Python / Chrome Driver]
Frequently used ps command options
Scraping with selenium in Python
Download the file in Python
Find the difference in Python
Python Input Note in AtCoder
Scraping with Selenium in Python
[Python] Frequently used library code
Python frequently used code snippets
Frequently used commands in virtualenv
Commands often used in the development environment during Python implementation
[Note] Import of a file in the parent directory in Python
Pharmaceutical company researchers have summarized the operators used in Python
[Python] A memo of frequently used phrases (by myself) in Python scripts
Getting the arXiv API in Python
How to determine the existence of a selenium element in Python
[Note] Project Euler in Python (Problem 1-22)
python Note: Determine if command line arguments are in the list
Python in the browser: Brython's recommendation
Save the binary file in Python
Scraping with Selenium in Python (Basic)
Hit the Sesami API in Python
Get the desktop path in Python
Get the script path in Python
[Python] Basic knowledge used in AtCoder
In the python command python points to python3.8
Implement the Singleton pattern in Python
Write selenium test code in python
Hit the web API in Python
Foreign Key in Python SQLite [Note]
I wrote the queue in Python
Calculate the previous month in Python
Examine the object's class in python
Get the desktop path in Python
A class that summarizes frequently used methods in twitter api (python)
Get the host name in Python
[Python] Do not put Japanese in the path used by OpenCV
Access the Twitter API in Python
Python Note: Get the current month
The first step in Python Matplotlib
I wrote the stack in Python
Master the weakref module in Python
Get a capture of the entire web page in Selenium Python VBA
When Selenium tells me that the Chrome driver version is different (Python)
[Python] Calculate the number of digits required when filling in 0s [Note]
Modules of frequently used functions in Python (such as reading external files)
[Introduction to Python] Thorough explanation of the character string type used in Python!
A useful note when using Python for the first time in a while
Learn the design pattern "Prototype" in Python
Learn the design pattern "Builder" in Python
Load the remote Python SDK in IntelliJ
Try using the Wunderlist API in Python
Check the behavior of destructor in Python