← 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 => Solved

fordox confirmed that the question is solved:
did like this:

import random
import urllib
import re

getval = urllib.urlopen("http://example.com/get.php?%s";)
a = getval.read()
b = re.search('delay=(.*?)type=(.*?)$', a)
c = b.group(1)
d = b.group(2)

if (c.find(",")==-1):
	time = eval("random.randint("+c+","+c+")");
else:
	time = eval("random.randint("+c+")");
var = int(d)

print time, var

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