Skip to content
This repository has been archived by the owner on Jan 2, 2020. It is now read-only.

Commit

Permalink
fix 'query'
Browse files Browse the repository at this point in the history
  • Loading branch information
xlcnd committed Mar 12, 2019
1 parent b7c86e9 commit ae2f4cb
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions isbnlib_oclc/_oclc.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,10 @@ def query(isbn):
parser=parser_pub)
if not data2: # pragma: no cover
LOGGER.debug("The parser 'pub' was unsucessful for %s!", isbn)
return _records(isbn, data)

buf = data2.get('Publisher', u('')).split(':')[1]
publisher, year = buf.split(',')
data['publisher'] = publisher.strip()
data['year'] = RE_YEAR.search(year.strip('. ')).group(0)
else:
buf = data2.get('Publisher', u('')).split(':')[1]
publisher, year = buf.split(',')
data['publisher'] = publisher.strip()
data['year'] = RE_YEAR.search(year.strip('. ')).group(0)

return _records(isbn, data)

0 comments on commit ae2f4cb

Please sign in to comment.