def getHttp(url, argD): while data is None: try: data = urllib.urlopen(url, data=urllib.urlencode(argD)).read() except Whatever: pass else: return data