Skip to content

Instantly share code, notes, and snippets.

@mohamadkhoshnava
Created October 19, 2019 07:26
Show Gist options
  • Select an option

  • Save mohamadkhoshnava/bd73e6c4a2db84676136cb5b4a9e2ce2 to your computer and use it in GitHub Desktop.

Select an option

Save mohamadkhoshnava/bd73e6c4a2db84676136cb5b4a9e2ce2 to your computer and use it in GitHub Desktop.

Revisions

  1. mohamadkhoshnava created this gist Oct 19, 2019.
    18 changes: 18 additions & 0 deletions irproxy.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    from bs4 import BeautifulSoup
    import requests
    import re

    print("search iran proxy started")
    response = requests.get('https://www.proxynova.com/proxy-server-list/country-ir/').text
    soup = BeautifulSoup(response, "html.parser")
    tables = soup.findAll("tr")
    for x in tables:
    try:
    ip = x.find("abbr")["title"]
    port = x.findAll("td", {"align":"left"})[1].find("a").get_text()
    print('{}:{}'.format(ip, port))
    except:
    pass


    #Code By SeYeD :) @ITMKH