Skip to content

Instantly share code, notes, and snippets.

@seyed-dev
Created October 19, 2019 07:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seyed-dev/bd73e6c4a2db84676136cb5b4a9e2ce2 to your computer and use it in GitHub Desktop.
Save seyed-dev/bd73e6c4a2db84676136cb5b4a9e2ce2 to your computer and use it in GitHub Desktop.
دریافت تعدادی پروکسی سالم ایران
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment