include – in search for isbns

This commit is contained in:
j 2016-01-16 10:18:30 +05:30
parent 08e9472d2a
commit 280cb56b38
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ def normalize_isbn(value):
def find_isbns(text):
if isinstance(text, bytes):
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 = [to_isbn13(value) for value in matches]
matches = list(set([value for value in matches if value]))