Add OCLC identifier to URL and use the direct ISBN link instead of worldcat search of isbn->URL

This commit is contained in:
Kovid Goyal 2011-04-25 15:47:50 -06:00
parent b76159f31c
commit aced39619e

View File

@ -446,7 +446,7 @@ def urls_from_identifiers(identifiers): # {{{
isbn = identifiers.get('isbn', None) isbn = identifiers.get('isbn', None)
if isbn: if isbn:
ans.append((isbn, 'isbn', isbn, ans.append((isbn, 'isbn', isbn,
'http://www.worldcat.org/search?q=bn%%3A%s&qt=advanced'%isbn)) 'http://www.worldcat.org/isbn/'+isbn))
doi = identifiers.get('doi', None) doi = identifiers.get('doi', None)
if doi: if doi:
ans.append(('DOI', 'doi', doi, ans.append(('DOI', 'doi', doi,
@ -455,6 +455,10 @@ def urls_from_identifiers(identifiers): # {{{
if arxiv: if arxiv:
ans.append(('arXiv', 'arxiv', arxiv, ans.append(('arXiv', 'arxiv', arxiv,
'http://arxiv.org/abs/'+arxiv)) 'http://arxiv.org/abs/'+arxiv))
oclc = identifiers.get('oclc', None)
if oclc:
ans.append(('OCLC', 'oclc', oclc,
'http://www.worldcat.org/oclc/'+oclc))
return ans return ans
# }}} # }}}