Improve year and editor matching
This commit is contained in:
parent
2a98c4e8d4
commit
5ca1623761
1 changed files with 1 additions and 1 deletions
|
@ -323,7 +323,7 @@ def isbn_api(request, isbn):
|
||||||
extra_info = extra_info[0].get_text(strip=True)
|
extra_info = extra_info[0].get_text(strip=True)
|
||||||
logger.debug('extra_info')
|
logger.debug('extra_info')
|
||||||
logger.debug(extra_info)
|
logger.debug(extra_info)
|
||||||
matches = re.search(r'Date de parution(?: :)?\d{2}/\d{2}/(?P<year>\d{4})Editeur(?: :)?(?P<editor>[\w ]+)ISBN', extra_info)
|
matches = re.search(r'Date de parution(?: :)?\d{2}/\d{2}/(?P<year>\d{4})Editeur(?: :)?(?P<editor>.+?)(?:ISBN|Collection)', extra_info)
|
||||||
if matches:
|
if matches:
|
||||||
groups = matches.groupdict()
|
groups = matches.groupdict()
|
||||||
year = groups.get('year')
|
year = groups.get('year')
|
||||||
|
|
Loading…
Reference in a new issue