PROXY-List icon indicating copy to clipboard operation
PROXY-List copied to clipboard

no_proxy = proxies.get('no_proxy') if proxies is not None else None AttributeError: 'str' object has no attribute 'get'

Open fazialnjd opened this issue 2 years ago • 2 comments

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.

fazialnjd avatar Nov 14 '22 18:11 fazialnjd

@frida96 Share your error message along with the full code snippet

TheSpeedX avatar Nov 22 '22 07:11 TheSpeedX

response = requests.get('https://icanhazip.com/', proxies=proxies)

raoulduivestein avatar Dec 28 '22 19:12 raoulduivestein