Python/cURL
Aus SchnallIchNet
pycurl (cURL for python)
import pycurl import StringIO b = StringIO.StringIO() c = pycurl.Curl() c.setopt(pycurl.URL, "http://www.python.org/") c.setopt(pycurl.HTTPHEADER, ["Accept:"]) c.setopt(pycurl.WRITEFUNCTION, b.write) c.setopt(pycurl.FOLLOWLOCATION, 1) c.setopt(pycurl.MAXREDIRS, 5) c.perform() print b.getvalue() print c.getinfo(pycurl.HTTP_CODE), c.getinfo(pycurl.EFFECTIVE_URL)