a script to scrape Uniprot

I wrote a rudimental script to scrape the Uniprot Website and extract some information about a list of Uniprot entries. This may be useful as an example on how to query Uniprot (since I couldn’t find any public API nor library), or to get infos about a list a genes of your interest.

NOTE: the correct way to do this is by the Retrieve Tool from the Uniprot page. The script presented in this post is just an example of how to use the python library Mechanize.

The code is available at bitbucket. Usage is simple: edit the files to enter your email address and the list of IDs you are interested in, and run it as a python script.