no_proxy = proxies.get('no_proxy') if proxies is not None else None AttributeError: 'str' object has no attribute 'get'
fazialnjd opened this issue · 2 comments
fazialnjd commented
Hi.
This is my code; and I get this error.
file1 = open("http.txt", 'r')
Lines = file1.readlines()
for line in Lines:
line = line.strip('\n')
proxies = {
"http": 'http://' + line,
"https": 'https://' + line,
}
response = requests.get('https://icanhazip.com/', proxies=line)
How can I solve it?
Thanks.
raoulduivestein commented
response = requests.get('https://icanhazip.com/', proxies=proxies)