From 4fb414f95b6dec0fd07879babb3f2a129e7fb5ee Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 28 Aug 2016 14:45:27 +0530 Subject: [PATCH] Same optimization for google books --- src/calibre/ebooks/metadata/sources/google.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/calibre/ebooks/metadata/sources/google.py b/src/calibre/ebooks/metadata/sources/google.py index 0f9838cc5a..cccc1fe3b6 100644 --- a/src/calibre/ebooks/metadata/sources/google.py +++ b/src/calibre/ebooks/metadata/sources/google.py @@ -165,19 +165,19 @@ class GoogleBooks(Source): supports_gzip_transfer_encoding = True cached_cover_url_is_reliable = False - GOOGLE_COVER = 'http://books.google.com/books?id=%s&printsec=frontcover&img=1' + GOOGLE_COVER = 'https://books.google.com/books?id=%s&printsec=frontcover&img=1' DUMMY_IMAGE_MD5 = frozenset(['0de4383ebad0adad5eeb8975cd796657']) def get_book_url(self, identifiers): # {{{ goog = identifiers.get('google', None) if goog is not None: - return ('google', goog, 'http://books.google.com/books?id=%s'%goog) + return ('google', goog, 'https://books.google.com/books?id=%s'%goog) # }}} def create_query(self, log, title=None, authors=None, identifiers={}): # {{{ from urllib import urlencode - BASE_URL = 'http://books.google.com/books/feeds/volumes?' + BASE_URL = 'https://books.google.com/books/feeds/volumes?' isbn = check_isbn(identifiers.get('isbn', None)) q = '' if isbn is not None: @@ -336,7 +336,7 @@ if __name__ == '__main__': # tests {{{ {'identifiers':{'isbn': '0743273567'}, 'title':'Great Gatsby', 'authors':['Fitzgerald']}, [title_test('The great gatsby', exact=True), - authors_test(['Francis Scott Fitzgerald'])] + authors_test(['F. Scott Fitzgerald'])] ), (