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?

7 comments:

David said...

No idea if the following reference might help but there are some minor differences between your code and what I found at http://snippets.dzone.com/posts/show/3937 such as using an = between save cookies and the filename, etc.

I'm not home to try it out right now

David - K2DSL

Unknown said...

Hi David. I spotted that, but the parameters seem to work whether a space or an = is used.

David said...

I participated in this weekends CQ WW RTTY contest but during this week I'll try and find time to see if I can figure out a way to make WGET work.

David said...

I took a look at the steps at when you go to the DownloadInBox.cfm URL it generates a page that has a link on it to then get the ADIF or TXT file. That URL of that link is dynamic and seems to change each time I would load the page. I didn't see a way with wget to parse the page.

Are you using any other programs/utilities with wget? I didn't look at Stephen's source for HRDU which I could download from his site, but I imagine he's parsing the contents of the page to get the ADIF or TXT file, then parsing that, etc.

Unknown said...

David, Stephen's program parses the page to get the download filename. I would have to do the same, to generate a script that runs individual wgets to download each QSL card.

Fran said...

hello David, I think the issue is connected with the "nickname" if you have multiple accounts on eQSL, that's why is not downloading the file. EA1JM, Fran. Tell me if you have success with the project!!

Unknown said...

It is an alternative polish program to download eQSL from multiple accounts.
Generates also a script to be placed QSL on you web page .
Can be downloaded from:

This is still a development version, later it will also be able to download eCARD from HRDlog.net