Non-interactive text proxy lists download for python

Non-interactive text proxy lists download for python


CODE for python
[ perl | python | java6 | wget | curl | java ]
  • with PYTHON (dynamic object-oriented programming open source language):
    
    #!/usr/bin/python
    
    import cookielib, urllib2, os
    
    opener = urllib2.build_opener(
     urllib2.HTTPCookieProcessor(cookielib.CookieJar()))
    opener.addheaders = [('User-agent',
     'Rosinstrument.com (compatible; ver. 0.2)')]
    
    base = 'http://rosinstrument.com/cgi-bin'
    
    opener.open( base + '/login.pl').close()
    opener.open( base + '/login.pl',
     'login=[YOUR_LOGIN]&passwd=[YOUR_PASSWD]'
    ).close()
    
    for list in ['http1000', 'httpanon500', 'https500', 'socks1000']:
     try:
      reader = opener.open(base + '/tl.pl?' + list)
      file = open(list + '.txt', 'w', 0644)
      for line in reader: file.write(line)
      file.close()
      reader.close()
     except:
      continue
    
    
Results has been placed in text files http1000.txt, httpanon500.txt, https500.txt, socks1000.txt.