how to use requests.post() with proxy authentication in python?

前端 未结 1 1589
太阳男子
太阳男子 2021-02-11 02:20
from bs4 import BeautifulSoup
import requests
from requests.auth import HTTPProxyAuth

url = \"http://www.transtats.bts.gov/Data_Elements.aspx?Data=2\" 
proxies = {\"htt         


        
1条回答
  •  甜味超标
    2021-02-11 03:01

    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)
    

    0 讨论(0)
提交回复
热议问题