How to limit returns on an edition search using isbnlib library in Python?

175 views Asked by At

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!

1

There are 1 answers

0
AlexAtStack On

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.