Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- import mechanize
- url = 'http://web.expasy.org/cgi-bin/peptide_mass/peptide-mass.pl?P35225'
- br = mechanize.Browser(factory=mechanize.RobustFactory())
- br.set_handle_robots(False)
- br.open(url)
- br.select_form(nr=0)
- br.form['protein'] = 'P35225'
- br.form['mandatory'] = ''
- br.form['reagents'] = ['nothing (in reduced form)', ]
- br.form['mplus'] = ['mh',]
- br.form['masses'] = ['monoisotopic',]
- br.form['enzyme'] = ['Trypsin',]
- br.form['MC'] = ['0',]
- br.form['minmass'] = ['500',]
- br.form['maxmass'] = ['unlimited',]
- br.form['order'] = ['mass',]
- br.form['modification']= ['on',]
- page2 = br.submit()
- savefile = open('form.html', 'w')
- HTML = page2.read()
- savefile.write(HTML)
- savefile.close()
Advertisement
Add Comment
Please, Sign In to add comment