TheSpeedX/PROXY-List

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

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.

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

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