From 280cb56b3821a30c587f561db6b12c1885029678 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 16 Jan 2016 10:18:30 +0530 Subject: [PATCH] =?UTF-8?q?include=20=E2=80=93=20in=20search=20for=20isbns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oml/meta/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oml/meta/utils.py b/oml/meta/utils.py index b47e4ec..e8a92f8 100644 --- a/oml/meta/utils.py +++ b/oml/meta/utils.py @@ -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]))