code: def get_http(base_url, function, opts):
      
      url = (os.path.join(base_url, function) + '/?' + urlencode(opts))
      data = urlopen(url)
  
      if data.code != 200:
          raise ValueError("Random.rg returned server code: " + str(data.code))
      return data.read()
docs: HTTP request generator.