Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python requests set user agent

import requests

url = 'SOME URL'

headers = {
    'User-Agent': 'My User Agent 1.0',
    'From': 'youremail@domain.com'  # This is another valid field
}

response = requests.get(url, headers=headers)
Comment

PREVIOUS NEXT
Code Example
Python :: pandas append csv files a+ 
Python :: pygame get mouse position 
Python :: ndarray to pil image 
Python :: numpy install wtih conda 
Python :: get last column pandas 
Python :: rmse in python 
Python :: selenium python enter text 
Python :: python how move file to directory 
Python :: pandas row starts with 
Python :: python - convert index to a column 
Python :: webbrowser python could not locate runnable browser 
Python :: split string every n characters python 
Python :: python3 iterate through indexes 
Python :: convert json to x-www-form-urlencoded pyhon 
Python :: horizontal line for pyplot 
Python :: return result from exec python 
Python :: python format 2 digits 
Python :: python random number 
Python :: python os if file exists 
Python :: check if string url python 
Python :: python time using timeit module 
Python :: pip install arcpy python 3 
Python :: matplotlib add space between subplots 
Python :: copy files python 
Python :: how to save query data into dataframe pscopg2 
Python :: get first of current month python 
Python :: char to binary python 
Python :: how to update pandas 
Python :: n random numbers python 
Python :: string to time python 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =