Forum Moderators: bakedjake
import urllib import threading from mechanize import Browser class ImageGrabber(threading.Thread): def __init__(self,url,imgnum,searchterm): self.url=url self.imgnum=imgnum self.searchterm=searchterm threading.Thread.__init__(self) def run(self): urllib.urlretrieve(self.url,'test') class ImageResults: def grabresults(query): br=Browser() response=br.open('http://images.google.co.uk/images?hl=en&q=%s&btnG=Search'%(query)) print response.read() i=ImageResults() i.grabresults('house') When i try to run it i get the following error:
TypeError: grabresults() takes exactly 1 argument (2 given)