[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using wget to fill in a form



On 22/09/12 11:01 AM, craig@gtek.biz wrote:
Greetings,

I have a small book collection (~150) that I thought would be neat to catalog by the Library of Congress catalog numbers. I have found a LOC search form that will allow me to input the ISBN, and it will return the information I want:

[code]http://www.loc.gov/cgi-bin/zgate?ACTION=INIT&FORM_HOST_PORT=/prod/www/data/z3950/locils2.html,z3950.loc.gov,7090[/code]

I have the list of book ISBNs in a text file, so scripting this should be quite easy. The problem is I can't figure out how to submit the form from the command line. I figured wget would be the best way, but everything I try results in downloading a single line that reads "Your form didn't include an ACTION!" So I thought I would turn to here for help. The test ISBN I am using is for The Linux Cookbook: 1886411484, QA76.76.O63S788 2001.

And a related side question. From my reading, I've learned that the Z39.50 protocol is used to query databases, usually library related. Is anyone aware of an ISBN database table that can be downloaded by the user, preferably in a format that can be imported into MySQL or PostgreSQL?

Thanks, Craig

The url you give is for the form. If you enter an ISBN number it will do the search.

What you need to do is capture the http header sent when you click "submit query" then replace the test ISBN number with whatever number you want to search. Wireshark can do this. Simply look for the query packet(s).


Reply to: