Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python selenium headers

from seleniumwire import webdriver  # Import from seleniumwire

# Create a new instance of the Chrome driver (or Firefox)
driver = webdriver.Chrome()

# Create a request interceptor
def interceptor(request):
    del request.headers['Referer']  # Delete the header first
    request.headers['Referer'] = 'some_referer'

# Set the interceptor on the driver
driver.request_interceptor = interceptor

# All requests will now use 'some_referer' for the referer
driver.get('https://mysite')
Comment

PREVIOUS NEXT
Code Example
Python :: when was python developed 
Python :: how to use timeit in python 3 
Python :: left join outer apply 
Python :: how to download the captions of a youtube video 
Python :: own labels for ticks matplotlib 
Python :: ipython save session 
Python :: is power of python recursion 
Python :: python tabulate float format 
Python :: print only numbers from string python 
Python :: how to write to a netcdf file using xarray 
Python :: python continue 
Python :: How to search where a character is in an array in python 
Python :: python decimal to string 
Python :: convert string to dictionary python 
Python :: list comprehenstsion using lambda funcion 
Python :: change variable type python 
Python :: convert pandas dataframe/ table to python dictionary 
Python :: how to print a matrix in python 
Python :: replace character in string python 
Python :: Python Tkinter Canvas Widget 
Python :: difference between object and class in python 
Python :: CSRF verification failed. Request aborted. 
Python :: pytorch get gpu number 
Python :: exeption python syntax 
Python :: integer colomn to datetime 
Python :: how to create window in tkinter 
Python :: check input in python 
Python :: affinity propagation python 
Python :: best pyqt5 book 
Python :: install imgkit py 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =