Skip to content

Instantly share code, notes, and snippets.

@marcelcaraciolo
Created February 23, 2012 18:13
Show Gist options
  • Save marcelcaraciolo/1894181 to your computer and use it in GitHub Desktop.
Save marcelcaraciolo/1894181 to your computer and use it in GitHub Desktop.
download2.py
# -*- coding: utf-8 -*-
import mechanize
br = mechanize.Browser()
br.open("http://www.bmfbovespa.com.br/opcoes/opcoes.aspx?Idioma=pt-br")
br.select_form(nr=0)
response = br.submit(name='ctl00$contentPlaceHolderConteudo$posicoesAbertoEmp$btnBuscarArquivos')
f = open("teste.dat", "w")
f.write(response.read())
f.flush()
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment