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
If you want to do Google searches "properly" through a programming interface, take a look at Google APIs. Not only are these the official way of searching Google, they are also not likely to change if Google changes their result page layout.