Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #requests #set #user #agent
ADD COMMENT
Topic
Name
2+8 =