Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to scrape Brenda Enzymes for a bunch of molecule files with a script. If I just download by file URL (it's a PHP redirect), I get a 0Kb file, so I think they're checking for cookies and/or referer.

Then I did this:

1st request

$ wget --cookies=on --keep-session-cookies --save-cookies=cookies.txt ""

2nd request

$ wget --referer="" --cookies=on --load-cookies=cookies.txt --keep-session-cookies --save-cookies=cookies.txt -O test.mol

Still nothing, the resulting test.mol is an empty file.

However, if I follow the first URL in a browser, and then copy-n-paste the second URL, it does download an actual 3Kb-ish .mol file.

What am I missing? Thanks.

share|improve this question
testing your two wget works on my linux host... perhaps you have to delete cookies.txt ... i get a test.mo1 of 2168 Bytes. – philippe lhardy Mar 17 '13 at 16:24
Make sure your cookies.txt is blank when trying the 1st request, the existing cookie may be confusing the server. – LawrenceC Sep 9 '15 at 12:41
up vote 2 down vote accepted

A better way to do what you are attempting is to use SOAP queries. According to their documentation, the Brenda site offers SOAP functionality.

I don't know what type of information you are looking for. The following is an example of a Perl script to get the Km value for the molecule with an EC number of

#!/usr/bin/perl -w
use SOAP::Lite;

$resultString = SOAP::Lite
-> uri('')
-> proxy('')
-> getKmValue("ecNumber**Homo sapiens#")
-> result; 

print $resultString;

Have a look through the documentation, you should be able to find what you need.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.