Info -> Debug
This commit is contained in:
parent
bd1f5a8257
commit
c6f9fb4287
1 changed files with 7 additions and 7 deletions
|
@ -311,18 +311,18 @@ def isbn_api(request, isbn):
|
||||||
year = None
|
year = None
|
||||||
editor = None
|
editor = None
|
||||||
extra_info = decitre_soup.select('.informations-container')
|
extra_info = decitre_soup.select('.informations-container')
|
||||||
logger.info('raw extra_info')
|
logger.debug('raw extra_info')
|
||||||
logger.info(extra_info)
|
logger.debug(extra_info)
|
||||||
if not extra_info:
|
if not extra_info:
|
||||||
logger.info('#fiche-technique')
|
logger.debug('#fiche-technique')
|
||||||
extra_info = decitre_soup.select('#fiche-technique')
|
extra_info = decitre_soup.select('#fiche-technique')
|
||||||
logger.info('raw extra_info fiche technique')
|
logger.debug('raw extra_info fiche technique')
|
||||||
logger.info(extra_info)
|
logger.debug(extra_info)
|
||||||
|
|
||||||
if extra_info:
|
if extra_info:
|
||||||
extra_info = extra_info[0].get_text(strip=True)
|
extra_info = extra_info[0].get_text(strip=True)
|
||||||
logger.info('extra_info')
|
logger.debug('extra_info')
|
||||||
logger.info(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>[\w ]+)ISBN', extra_info)
|
||||||
if matches:
|
if matches:
|
||||||
groups = matches.groupdict()
|
groups = matches.groupdict()
|
||||||
|
|
Loading…
Reference in a new issue