I found out how to retreive the html page of a topic from google search using a tutorial.This was given in the tutorial.
import mechanize
br = mechanize.Browser()
br.open('http://www.google.co.in')
br.select_form(nr = 0)
I understood till this that it retrieves the form.Then it was given that
br.form['q'] = 'search topic'
br.submit()
br.response.read()
This does output the html of the page related to the search topic. But my doubt is what should this parameter in br.form[parameter] be? Because I tried it for Google News and it gave a successful result.Can someone help me out?