I know how to use proxies
in requests
module in Python, but sometimes there is a proxy file which I can't distinct among http
, https
and ftp
proxies to put them correctly in dictionary.
proxies = {
"http": 'ip:port'
}
How can I understand for example this line proxy is http
or next one is https
, etc?
http
in this case is not protocol of the proxy. It's which proxy will handle this schema. If you want to handle all traffic with the same proxy just enumerate all used protocols (schemas of URLs that you use) with the same proxy setting.
{
"http": 'ip:port',
"https": 'ip:port',
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.