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

前端 未结 1 1322
闹比i
闹比i 2021-02-11 02:16
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:07

    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)
提交回复
热议问题