Moin!
Ich möchte mit der URLLIB aus Python 3.1 Post Elemente an eine Website übergeben.
Aus der Dokumentation
http://docs.python.org/3.1/library/urllib.request.html
werd ich nicht ganz schlau:roll:...
Kann mir jemand ein Beispiel geben?
Urllib Post Elemente übergeben
- Defnull
- User
- Beiträge: 778
- Registriert: Donnerstag 18. Juni 2009, 22:09
- Wohnort: Göttingen
- Kontaktdaten:
Es steht doch genau im text, wie das geht:
http://docs.python.org/3.1/library/urll ... st.urlopen
Oder hapert es am Englisch?
http://docs.python.org/3.1/library/urll ... st.urlopen
Oder hapert es am Englisch?
Bottle: Micro Web Framework + Development Blog
Ich versteh schon den Sinn des Textes, aber wie übergeb ich z.B. user=xyz und pw=abc an die Site, also was muss in dem DATA String stehen?data may be a string specifying additional data to send to the server, or None if no such data is needed. Currently HTTP requests are the only ones that use data; the HTTP request will be a POST instead of a GET when the data parameter is provided. data should be a buffer in the standard application/x-www-form-urlencoded format. The urllib.parse.urlencode() function takes a mapping or sequence of 2-tuples and returns a string in this format.
the more they change the more they stay the same