include – in search for isbns
This commit is contained in:
parent
08e9472d2a
commit
280cb56b38
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ def normalize_isbn(value):
|
||||||
def find_isbns(text):
|
def find_isbns(text):
|
||||||
if isinstance(text, bytes):
|
if isinstance(text, bytes):
|
||||||
text = text.decode()
|
text = text.decode()
|
||||||
matches = re.compile('\d[\d\-X\u2013\ ]+').findall(text)
|
matches = re.compile('\d[\d\-X\u2013–\ ]+').findall(text)
|
||||||
matches = [normalize_isbn(value) for value in matches]
|
matches = [normalize_isbn(value) for value in matches]
|
||||||
matches = [to_isbn13(value) for value in matches]
|
matches = [to_isbn13(value) for value in matches]
|
||||||
matches = list(set([value for value in matches if value]))
|
matches = list(set([value for value in matches if value]))
|
||||||
|
|
Loading…
Reference in a new issue