On Tue, Mar 5, 2013 at 3:16 PM, Mark Klarer <[email protected]> wrote:

> Hi list,
>
> Is there any way to get electronic edition results in searches, in one
> results list?
> Currently if I search for example on 'options' in title and select 'show
> only eBooks', the results are the works listed in the results. To get the
> books, I have to select each works page.
> Search Results 182 hits
> 182 hits
>
>  Only ebooks [x]
>
> Options by O. Henry
> 39 editions (6 ebooks) - first published in 1909
> Read
>
>  Options by Peter Ritchken
> 2 editions (1 ebook) - first published in 1987
> Borrow
>
>  Options by Douglas Alan Walrath
> 2 editions (1 ebook) - first published in 1988
> DAISY
>
> … and the rest.
>
>
>
> What I want is all the books in one page, with the count of Ebooks, not a
> count of the works. Like this:
> 192 results (this is the count of ebook results, not the number of works)
>
> 1909, Doubleday, Page & co. for Review of Reviews co.
> Options
> in English
> works/OL181959W/Options
> books/OL24178092M/Options
>
> 1920, Doubleday, Page, for Review of reviews co.
> Options
> works/OL181959W/Options
> books/OL7182659M/Options
>
> 1918, Doubleday, Page & company, for Review of reviews co.
> Options.
> works/OL181959W/Options
> books/OL7163147M/Options.
>
> 1918, Doubleday, Page
> Options
> works/OL181959W/Options
> books/OL7094342M/Options
>
> 1913, published by Doubleday, Page & Company for Review of Reviews Co.
> Options
> Authorized ed.
> works/OL181959W/Options
> books/OL7150607M/Options
>
> 1909, Doubleday, Page for Review of Reviews Co.
> Options
> works/OL181959W/Options
> books/OL7137392M/Options
>
> 1987, Scott, Foresman
> Options
> in English
> works/OL2910930W/Options
> books/OL2735353M/Options
>
> April 1988, Pilgrim Pr
> Options
> Paperback in English
> works/OL3488030W/Options
> books/OL8182677M/Options
>
> … and the rest.
>
> I showed the first 8 results from the first 3 works. I had to go through 3
> pages, one for each work.
> So is there any way to search open library and get results like that?
> Or do I have to get book pages for each work? I can program it the
> multiple page way too, but the single page of results will be much easier
> to work with.
>

You say "program it," but also talk about pages as if they're web pages (ie
HTML).  Are you using the API?

http://openlibrary.org/search.json?has_fulltext=true&title=options

It's kind of hidden, but the ebook information is in there.  If you look at
docs[0].ia for example, it's got this list of Internet Archive keys which
matches the ebook_count:

ia:
[

   - "optionsohenry00henriala",
   - "optionso00henruoft",
   - "optionshenryo00henriala",
   - "optionsroseof00henrrich",
   - "cu31924022025807",
   - "optionso00henrrich"

],
ebook_count_i: 6,

You can construct the IA URLs by hand or call the API again with a list of
edition IDs to get the preview URLs built for you:

http://openlibrary.org/api/books?bibkeys=OLID:OL7137392M,OLID:OL23767475M,OLID:OL7012644M


Tom
_______________________________________________
Ol-tech mailing list
[email protected]
http://mail.archive.org/cgi-bin/mailman/listinfo/ol-tech
To unsubscribe from this mailing list, send email to 
[email protected]

Reply via email to