Re: Using wget to fill in a form

2012-10-02 Thread craig
There are several urls on loc.gov that will retrieve book information from an ISBN. The one below has no problem with session cookies. So wouldn't this quick and dirty one-liner do what you want? #!/bin/sh # loc.sh ISBN elinks -dump -dump-charset utf8 -no-references

Re: Using wget to fill in a form

2012-09-30 Thread Morten Bo Johansen
cr...@gtek.biz cr...@gtek.biz wrote: 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: [..] I have the

Re: Using wget to fill in a form

2012-09-29 Thread craig
They've learned a lot about the structure of classification systems since LC was set up. I've been doing some reading, and there is work under way to modernize the classification system. In the meantime this works for my needs. I do appreciate the suggestion. Sent - Gtek Web Mail -- To

Re: Using wget to fill in a form

2012-09-29 Thread craig
In the end I did pretty much as suggested, using wget and re-using session IDs. I created a bash script that gets a session ID, reads the list of ISBN numbers, and then tries to retrieve their info. If the retrieval returns a session expired then it gets a new one. It also does a decent job of

Re: Using wget to fill in a form

2012-09-28 Thread Hendrik Boom
On Sat, 22 Sep 2012 10:01:51 -0500, craig wrote: Greetings, I have a small book collection (~150) that I thought would be neat to catalog by the Library of Congress catalog numbers. This isn't what you asked for at all, but you might consider the BLISS classification instead. It's more

Re: Using wget to fill in a form

2012-09-28 Thread John Hasler
Hendrik Boom writes: It's more modern, and its classification guides are legitimately available for free download. What about LCC is not in the public domain? http://www.loc.gov/catdir/cpso/lcco/ -- John Hasler -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a

Re: Using wget to fill in a form

2012-09-25 Thread Chris Bannister
On Sat, Sep 22, 2012 at 10:01:51AM -0500, cr...@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

Re: Using wget to fill in a form

2012-09-25 Thread craig
Have a look at: http://search.cpan.org/dist/WWW-Mechanize/ Have a read of: http://www.perl.com/pub/2003/01/22/mechanize.html Do a google search on perl www::mechanize Thanks for the reply (and to the other kind folks that took time to reply). I will have to put this quest off until

Re: Using wget to fill in a form

2012-09-23 Thread Pertti Kosunen
On 22.9.2012 18:01, cr...@gtek.biz wrote: 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. http://curl.haxx.se/docs/manpage.html It should be quite easy with curl. -- To

Re: Using wget to fill in a form

2012-09-22 Thread Lars Noodén
On 9/22/12 6:01 PM, cr...@gtek.biz wrote: [snip] 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

Re: Using wget to fill in a form

2012-09-22 Thread Gary Dale
On 22/09/12 11:01 AM, cr...@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:

Re: Using wget to fill in a form

2012-09-22 Thread Lars Noodén
On 9/22/12 6:01 PM, cr...@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:

Re: Using wget to fill in a form

2012-09-22 Thread Gary Dale
On 22/09/12 11:27 AM, Gary Dale wrote: On 22/09/12 11:01 AM, cr...@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

Re: Using wget to fill in a form

2012-09-22 Thread Camaleón
On Sat, 22 Sep 2012 10:01:51 -0500, craig 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

Re: Using wget to fill in a form

2012-09-22 Thread craig
For background see the Bath Profile: http://www.ukoln.ac.uk/interop-focus/bath/ There are also bindings for C, C++ and PHP. You'll find them at IndexData's web site. As far as importing into MySQL or Postgresql, that is up to how you decide to map the Bath Profile (most likely the one used)

Re: Using wget to fill in a form

2012-09-22 Thread 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

Re: Using wget to fill in a form

2012-09-22 Thread craig
As others suggest, the query should be something like: wget http://www.loc.gov/cgi-bin/zgate --post-data=ACTION=SEARCHTERM_1=1886411484SESSION_ID=1234567 Yeah, I was messing with the --post-data, but I didn't know I had to use an ACTION key. Will play with that. But I get session expired

Re: Using wget to fill in a form

2012-09-22 Thread Lars Noodén
On 9/22/12 7:28 PM, cr...@gtek.biz wrote: [snip] I kind if figured that would be what I needed, but I'm not aware of any Z39.50 clients. [snip] Using ZOOM, mentioned in my previous post, you can use your perl script as a Z39.50 client to search the LOC catalog directly. There are also C, C++

Re: Using wget to fill in a form

2012-09-22 Thread craig
Using ZOOM, mentioned in my previous post, you can use your perl script as a Z39.50 client to search the LOC catalog directly. There are also C, C++ and PHP bindings. Ah, that makes sense. I will probably get after this again later today or tomorrow, and I will definitely post any success

Re: Using wget to fill in a form

2012-09-22 Thread Lars Noodén
On 9/22/12 7:46 PM, cr...@gtek.biz wrote: Using ZOOM, mentioned in my previous post, you can use your perl script as a Z39.50 client to search the LOC catalog directly. There are also C, C++ and PHP bindings. Ah, that makes sense. I will probably get after this again later today or

Re: Using wget to fill in a form

2012-09-22 Thread Camaleón
On Sat, 22 Sep 2012 11:28:50 -0500, craig wrote: As others suggest, the query should be something like: wget http://www.loc.gov/cgi-bin/zgate --post-data=ACTION=SEARCHTERM_1=1886411484SESSION_ID=1234567 Yeah, I was messing with the --post-data, but I didn't know I had to use an ACTION

Re: Using wget to fill in a form

2012-09-22 Thread Gary Dale
On 22/09/12 11:34 AM, Lars Noodén wrote: On 9/22/12 6:01 PM, cr...@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

Re: Using wget to fill in a form

2012-09-22 Thread Jude DaShiell
wget isn't the right tool for that job. However its brother wput may be able to do the job. On Sat, 22 Sep 2012, Gary Dale wrote: On 22/09/12 11:27 AM, Gary Dale wrote: On 22/09/12 11:01 AM, cr...@gtek.biz wrote: Greetings, I have a small book collection (~150) that I thought would