mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
When downloading metadata from isbndb.com, download a maximum of 30 results rather than 1000
This commit is contained in:
parent
421ad0b601
commit
59907f91c7
@ -17,10 +17,10 @@ BASE_URL = 'http://isbndb.com/api/books.xml?access_key=%(key)s&page_number=1&res
|
|||||||
class ISBNDBError(Exception):
|
class ISBNDBError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def fetch_metadata(url, max=100, timeout=5.):
|
def fetch_metadata(url, max=3, timeout=5.):
|
||||||
books = []
|
books = []
|
||||||
page_number = 1
|
page_number = 1
|
||||||
total_results = sys.maxint
|
total_results = 31
|
||||||
br = browser()
|
br = browser()
|
||||||
while len(books) < total_results and max > 0:
|
while len(books) < total_results and max > 0:
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user