title: Python: How can I change ip address every some minute from a pool of addresses on a debian server?
body: <p>I am writing a code to get Google Pagerank for a list of domains. After time and certain amount of queries my ips got blacklisted and now I am getting HTTP Error 403. My question is how can I add to my script to change the ip address every some seconds from the pool of ips that  I have on the measurement server that I am using. Can anybody help?</p>
  
  <pre><code>from __future__ import print_function, division
  import sys
  import urllib.request as _urlib1  # py3 
  import urllib.parse as _urlib2  # py 3
  
  def get_pagerank(url):
      hsh = check_hash(hash_url(url))
      gurl = 'http://toolbarqueries.google.com/tbr?client=navclient-auto&amp;features=Rank&amp;ch=%s&amp;q=info:%s' % (hsh, _urlib2.quote(url))
      u = _urlib1.urlopen(gurl)
      s = u.read().decode('utf-8')  # for py2, comment .decode() part
      #print(s)  # debug - response of server
      rank = s.strip()[9:]
      if rank == '':
          rank = 'None'
      if rank == 'None':
          rank = 'None'
      return rank
  </code></pre>
  
  <p>Here is my code:</p>