#!/usr/bin/python

##pE-API sample code for getting the basic proxy list
##This will return 3 IP:port combinations

##10/15/2011 
##samurai@psych0tik.net

##all we need is the ability to make HTTP GET requests
import urllib

##this is the URL for all pE-API features
API_URL = "http://proxyElite.net/API/index.php"

##requesting this page with no GET or POST parameters will return a list
##of 3 ip:port combinations, seperated by newlines (\n)
proxy_data = urllib.urlopen(API_URL)
data = proxy_data.read()

##loop through and do a bit of basic checking to make sure there is a
##proxy on the line, then print out the information
for proxy in data.split("\n"):
	if ":" in proxy:
		ip,port = proxy.split(":")
		print ip
		print port

