mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2607 (Remove non-numerical characters from ISBN when fetching metadata)
This commit is contained in:
parent
f0db185735
commit
12f0d53b1a
@ -3,7 +3,7 @@ __license__ = 'GPL 3'
|
||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
import traceback, sys, textwrap
|
||||
import traceback, sys, textwrap, re
|
||||
from threading import Thread
|
||||
|
||||
from calibre import preferred_encoding
|
||||
@ -90,6 +90,8 @@ def search(title=None, author=None, publisher=None, isbn=None, isbndb_key=None,
|
||||
verbose=0):
|
||||
assert not(title is None and author is None and publisher is None and \
|
||||
isbn is None)
|
||||
if isbn is not None:
|
||||
isbn = re.sub(r'[^a-zA-Z0-9]', '', isbn).upper()
|
||||
fetchers = [FetchGoogle(title, author, publisher, isbn, verbose)]
|
||||
if isbndb_key:
|
||||
fetchers.append(FetchISBNDB(title, author, publisher, isbn, verbose,
|
||||
|
Loading…
x
Reference in New Issue
Block a user