Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

selenium screenshot python user agent

from selenium import webdriver

user_agent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.50 Safari/537.36'

options = webdriver.ChromeOptions()
# specify headless mode
options.add_argument('headless')
# specify the desired user agent
options.add_argument(f'user-agent={user_agent}')
driver = webdriver.Chrome(chrome_options=options)

# user-agent is now set
Comment

PREVIOUS NEXT
Code Example
Python :: Python .on event triggers 
Python :: pigeonhole sort python 
Python :: get the first element that is larger than 
Python :: tokyo timezone python 
Python :: How to find the most similar word in a list in python 
Python :: python init dict by list 
Python :: iterative binary search 
Python :: difference between == and is 
Python :: confusion matrix code 
Python :: python should i use getters and setters 
Python :: change index function for class python 
Python :: The Python package manager (pip) can only be used from outside of IPython. 
Python :: python yield from 
Python :: easy python gui 
Python :: Converting a HDFDataset to numpy array 
Python :: one function in numpy array 
Python :: how to uninstall python 
Python :: python int to scientific string 
Python :: aiohttp set port 
Python :: how to format a file in python 
Python :: how to allow a range of numbers for example 1 to 14 on regular expression python 
Python :: how to create a spark schema using a string 
Python :: python odd or even 
Python :: merge two dict python 
Python :: list vs dictionary python 
Python :: how to extract keys from dictreader python 
Python :: import folder from another folder python 
Python :: pandas check is field is null or empty 
Python :: python remove multiple element from list by index 
Python :: python append 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =