Friday, September 25, 2009

How to wget my eQSLs?

I notice that a few bloggers have galleries or slideshows of the eQSL cards they have received on their websites. I thought it would be nice to do the same. However, I have over 500 confirmations on the eQSL server and saving each card to a file manually is not a task I relish.

The only program I know of that can download eQSLs automatically is one written by WD5EAE and its use is deprecated by eQSL.cc because it consumes too much server resources. I thought I could modify the program to add a delay between each download, as WD5EAE provides the source code. But it is written in a horrible proprietary language called WinBatch that costs $499 for a compiler. So that's a non-starter.

I thought that I could write a script using the GNU utility wget to do this. The difficulty is that you have to be logged in to access the relevant pages and eQSL.cc uses cookies to verify that you are authenticated.

I ran the command:
wget --save-cookies %TEMP%\eqsl --keep-session-cookies --post-data "Callsign=mycall&EnteredPassword=mypwd&Login=Go" -O - http://eqsl.cc/qslcard/LoginFinish.cfm
which logged me in and saved a cookie to the file "eqsl" in my temporary folder. But when I attempted to get a list of my Inbox using:
wget --load-cookies %TEMP%\eqsl --keep-session-cookies http://www.eqsl.cc/qslcard/DownloadInBox.cfm
the page returned showed that I was not logged in. I'm not much of an expert at this sort of thing although I've used wget in scripts to download files before. But I've looked at other wget examples on the net and I can't see what's wrong with this. Can anyone help?
Post a Comment