1

Right now I have:

editions = isbnlib.editions(isbn)
print(editions)

This returns about 100 similar isbns to the one entered within the parentheses. The problem is, this really slows down my program unnecessarily, as I only want 4 or 5 results. Is there a way I can fix this?

Here you can find an example project using .editions() from their docs: https://github.com/xlcnd/isbnlib/blob/master/isbnlib/test/test_editions.py

And a link to the Python library: https://pypi.python.org/pypi/isbnlib/3.7.2

Thanks!

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
  • Looking at their code, it doesn't look like the API was written to support this. If you are familiar with python code you could always take a peak and see if you could rewrite what they are doing as more of a generator, etc. – nbryans Sep 02 '17 at 22:04
  • 1
    [Edit] your Question and show a _**real**_ ISBN you are using. Use either `editions(isbn, service= ‘openl’)` or `editions(isbn, service=‘thingl’)` to restrict the query to only one Library. – stovfl Sep 03 '17 at 15:20

1 Answers1

1

Install isbnlib-3.8.3+ and use editions(isbn, service= ‘any’) to minimize the numbers of entries and maximize the probabilities of getting a non-empty answer.

AlexAtStack
  • 366
  • 2
  • 7