← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #259773]: Receive data from GET request

 

Question #259773 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/259773

    Status: Answered => Open

fordox is still having a problem:
I understand how to send the GET-request, but how to convert received
data back into a variable - is unclear.

import urllib
f = urllib.urlopen("http://example.com/get.php?%s";) # send request to http://example.com/get.php and receive a reply

Then I get a response like this:
http://example.com/get.php?mytime=50,100&vr=4

the question is how to assign the value for the variable "mytime" and
"work"?

...
mytime = random.randint (50, 100) # received from the GET request
vr = 4
...

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.