from twisted web client import getPage from twisted internet import re

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
from twisted.web.client import getPage
from twisted.internet import reactor
import urllib
def printData(data):
print data
reactor.stop()
question = 'test'
url='http://www.google.pl/search?hl=pl&q=%s&btnG=Szukaj+w+Google&lr=' % question
d = getPage(url, method='GET', timeout=5)
d.addCallback(printData)
reactor.run()