Thing you want to do
--Proxy settings --Auto redirect OFF --SSL authentication OFF --Hiding Warning displayed when requesting when SSL authentication is OFF
import requests
import ssl
import sys
#Hide Warning
if not sys.warnoptions:
import warnings
warnings.simplefilter("ignore")
#Proxy settings
proxies = {
"http(Or https)": "<Proxy server>:<port number>",
}
url = "<URL>"
#Request by specifying proxy setting, auto redirect OFF, SSL authentication OFF in the argument
r = requests.get(url,proxies=proxies,verify=False,allow_redirects = False)
print (r)
Recommended Posts