Answers for "how to set user agent in requests"

1

python requests set user agent

import requests

url = 'SOME URL'

headers = {
    'User-Agent': 'My User Agent 1.0',
    'From': '[email protected]'  # This is another valid field
}

response = requests.get(url, headers=headers)
Posted by: Guest on September-09-2020

Code answers related to "how to set user agent in requests"

Python Answers by Framework

Browse Popular Code Answers by Language