Skip to content Skip to sidebar Skip to footer

How To Use Requests.post() With Proxy Authentication In Python?

from bs4 import BeautifulSoup import requests from requests.auth import HTTPProxyAuth url = 'http://www.transtats.bts.gov/Data_Elements.aspx?Data=2' proxies = {'http':'xxx.xxx.x.

Solution 1:

On behalf of Vikas Neha Ojha so all can see

proxies = {'http': 'http://username:password@ip:port', 'https': 'http://username:password@ip:port'}

and then

requests.post(url, proxies=proxies, data=data)

Post a Comment for "How To Use Requests.post() With Proxy Authentication In Python?"