From aced39619e9dfea8c3a58fe48eaa396039f4052f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 25 Apr 2011 15:47:50 -0600 Subject: [PATCH] Add OCLC identifier to URL and use the direct ISBN link instead of worldcat search of isbn->URL --- src/calibre/ebooks/metadata/sources/identify.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/metadata/sources/identify.py b/src/calibre/ebooks/metadata/sources/identify.py index fd71e650a0..9a9e5aa164 100644 --- a/src/calibre/ebooks/metadata/sources/identify.py +++ b/src/calibre/ebooks/metadata/sources/identify.py @@ -446,7 +446,7 @@ def urls_from_identifiers(identifiers): # {{{ isbn = identifiers.get('isbn', None) if 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) if doi: ans.append(('DOI', 'doi', doi, @@ -455,6 +455,10 @@ def urls_from_identifiers(identifiers): # {{{ if arxiv: ans.append(('arXiv', 'arxiv', 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 # }}}