Mailinglist Archive: opensuse (1473 mails)

< Previous Next >
Re: [opensuse] programming suggestion needed...
  • From: Johnny Schu <subbyte@xxxxxxxxx>
  • Date: Fri, 12 Jun 2009 21:34:51 +0800
  • Message-id: <e0bd33390906120634j33bfcdc0gf888d37ec2fcc8a2@xxxxxxxxxxxxxx>
Maybe your idea is to request a form. You can use a POST method in
HTTP protocol. Here comes the code in python:

from httplib2 import Http
from urllib import urlencode
h = Http()
data = dict(name="Joe", comment="A test comment")
resp, content = h.request("http://bitworking.org/news/223/Meet-Ares";,
"POST", urlencode(data))
resp
{'status': '200', 'transfer-encoding': 'chunked', 'vary':
'Accept-Encoding,User-Agent',
'server': 'Apache', 'connection': 'close', 'date': 'Tue, 31 Jul 2007
15:29:52 GMT',
'content-type': 'text/html'}

More information, please visit http://code.google.com/p/httplib2/

To wait, just import time and write wait(number of seconds)


On Tue, Jun 9, 2009 at 10:54 PM, James Hatridge<James.Hatridge@xxxxxx> wrote:
HI all,

I'm looking for a way to have a program open a web site, then automaticly
click on a button. Then wait X seconds or minutes and do it again.

Can someone point me to some type of sample code that would do this?

Thanks,

JIM
--
Jim Hatridge
Linux User #88484
Ebay ID: WartHogBulletin
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx


--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
References