Consider the following Python code:
30 url = \"http://www.google.com/search?hl=en&safe=off&q=Monkey\" 31 url_object = urllib.request.urlopen(url); 32
this should do the trick
user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7'
url = "http://www.google.com/search?hl=en&safe=off&q=Monkey"
headers={'User-Agent':user_agent,}
request=urllib2.Request(url,None,headers) //The assembled request
response = urllib2.urlopen(request)
data = response.read() // The data u need