browser = mechanize.Browser()
page = browser.open(url)
html = page.get_data()
print html
It shows some strange characters. I suppose that it is UTF-8 string but Python doesn't know that and cannot show it properly.
How can I convert this string to unicode string like
u = u'test'
you need to define the encoding like :
mechanize need it .
for more information check this out http://www.python.org/dev/peps/pep-0263/
It was gzipped