THE MAIN AUTHOR OF THIS CODE MAO2116
PYTHON >=3.9.X+
REQUESTS
pip3 install maoproxy
from maoproxy import proxy
proxy.mproxy(type="")
Here type mean your security method of your url it contains 4 types of security method http,https,socks5 and all
from maoproxy import proxy
proxy.mproxy(type="https")
import requests
from maoproxy import proxy
ip_addresses = proxy.mproxy(type="http")
def proxy_request(url):
for mao_proxy in ip_addresses:
try:
proxies = {"http": f"http://{mao_proxy}", "https": f"http://{mao_proxy}"}
response = requests.get(url, proxies=proxies, timeout=30)
print(f"Proxy currently being used: {mao_proxy}")
except Exception as mao:
print("Error, looking for another proxy")
proxy_request("http://your_url.mao/")
"""
Exmaple:
proxy_request("http://google.com")
"""
Copyright (c) 2021 MAO-COMMUNITY Under MIT LICENSE