How to use HTTP proxy in Python3?

I am trying to connect to websites using an HTTP proxy. I tried using the query modules method:

import requests

proxies = {'http': '1.0.0.1:808'}

    a = requests.get('https://www.google.com', proxies=proxies)
    print(a.text)

This is sample code in the query module documentation. The code will print a Google source that completely ignores anything in the dictionary. I do not see what I am doing wrong.

I surfed the internet how to check and use the HTTP proxy in Python3 and no luck.

All I find is in Python 2.

Any help would be greatly appreciated. Thank.

+4
source share
1 answer

- HTTP, HTTPS. https , http, .

+1

All Articles