Answers for "python requests set useragent"

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

Python Answers by Framework

Browse Popular Code Answers by Language