We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86d25c8 commit 8625129Copy full SHA for 8625129
main.py
@@ -12,8 +12,12 @@
12
session = requests.Session()
13
proxies = {
14
'http': 'http://test:pass@localhost:8080',
15
- 'https': 'http://test:pass@localhost:8090',
+ 'https': 'https://test:pass@localhost:8090',
16
}
17
req = requests.Request('GET', url)
18
prep = req.prepare()
19
- session.rebuild_proxies(prep, proxies)
+ if 'https' in proxies and proxies['https'].startswith('https'):
20
+ prep.proxies = proxies
21
+ else:
22
+ prep.proxies = {'https': None, 'http': proxies['http']}
23
+ session.rebuild_proxies(prep, prep.proxies)
0 commit comments