main.py 941 B

123456789101112131415161718192021222324252627282930313233
  1. from weakref import proxy
  2. from requests import request
  3. from src.proxy_grab import proxyGrab
  4. from src.config import cls
  5. cls()
  6. def hidemyname():
  7. output = []
  8. for d in range(1, 5):
  9. request = proxyGrab.hidemyname.request(page=d)
  10. result = proxyGrab.hidemyname.sort(request=request)
  11. for i in result:
  12. print(i)
  13. output.append(i)
  14. with open("proxies.txt", "w") as tsg:
  15. tsg.write(str(output))
  16. def free_proxy_list():
  17. request = proxyGrab.free_proxy_list.request()
  18. result = proxyGrab.free_proxy_list.sort(request)
  19. print(result)
  20. def geonode():
  21. request = proxyGrab.geonode.request(proxies=5)
  22. result = proxyGrab.geonode.sort(request)
  23. print(result)
  24. def proxyscrape():
  25. request = proxyGrab.proxyscrape.request(protocol="socks5") # http, socks4, socks5 (no support ssl in proxyGrab)
  26. result = proxyGrab.proxyscrape.sort(request)
  27. print(result)
  28. proxyscrape()