View Single Post
Old 07-02-2026, 03:41 PM   #1
gadzuuks
Junior Member
gadzuuks began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2026
Device: Calibre
Question Download Cover Not Working

The "Download Cover" button on the Edit Metadata window isn't finding book covers in any of the sources it tries, but when the Search URL is pasted into a browser the desired result appears.

The workaround is to right-click the cover shown on the main browsing window and use "Search the internet..." followed by copying and pasting the desired image. What do I need to do to get the cover download function working?

Code:
Starting cover download for: Making Money 
Query: Making Money ['Terry Pratchett'] {} 

****************************** Google Images Covers ****************************** 
Request extra headers: [('User-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36')] 
Failed to download valid cover 
Took 0.5157022476196289 seconds 
Search URL: https://www.google.com/search?as_st=y&tbm=isch&as_q=Making+Money+Terry+Pratchett&as_epq=&as_oq=&as_eq=&cr=&as_sitesearch=&safe=images&tbs=isz:lt,islt:svga,iar:t,ift:jpg
No images found for, title: 'Making Money' and authors: ['Terry Pratchett'] 

******************************************************************************** 

****************************** Amazon.com Covers ****************************** 
Request extra headers: [('User-agent', 'Lynx/2.8.6rel.5 libwww-FM/2.14'), ('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8'), ('Upgrade-insecure-requests', '1'), ('Referer', 'https://www.bing.com/search?q=Making+Money+Terry+Pratchett+site%3Awww.amazon.com')] 
Failed to download valid cover 
Took 1.5092532634735107 seconds 
No cached cover found, running identify
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Server: auto
Making google query: https://www.google.com/search?q=Making+Money+Terry+Pratchett+site%3Awww.amazon.com
Failed to find any results on results page, with title: Making Money Terry Pratchett site:www.amazon.com - Google Search
No search engine results for terms: Making Money Terry Pratchett
Trying the bing search engine instead
Making bing query: https://www.bing.com/search?q=Making+Money+Terry+Pratchett+site%3Awww.amazon.com
Bing returned no results
No search engine results for terms: Making Money Terry Pratchett
No matches found with query: ['Making', 'Money', 'Terry', 'Pratchett']
No cover found 

******************************************************************************** 

****************************** Edelweiss Covers ****************************** 
Request extra headers: [('User-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36')] 
Failed to download valid cover 
Took 0.12074851989746094 seconds 
No cached cover found, running identify
Currently Edelweiss returns random books for search queries
No cover found 

******************************************************************************** 

****************************** Open Library Covers ****************************** 
Request extra headers: [('User-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36')] 
Failed to download valid cover 
Took 2.6226043701171875e-06 seconds 

******************************************************************************** 

****************************** Big Book Search Covers ****************************** 
Request extra headers: [('User-agent', 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko')] 
Failed to download valid cover 
Took 0.40665102005004883 seconds 
Failed to download cover from Big Book Search
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mechanize/_urllib2_fork.py", line 1242, in do_open
    h.request(str(req.get_method()), str(req.get_selector()), req.data,
  File "/usr/lib/python3.12/http/client.py", line 1356, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.12/http/client.py", line 1402, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.12/http/client.py", line 1351, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.12/http/client.py", line 1111, in _send_output
    self.send(msg)
  File "/usr/lib/python3.12/http/client.py", line 1055, in send
    self.connect()
  File "/usr/lib/python3.12/http/client.py", line 1497, in connect
    self.sock = self._context.wrap_socket(self.sock,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 1042, in _create
    self.do_handshake()
  File "/usr/lib/python3.12/ssl.py", line 1320, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'bigbooksearch.com'. (_ssl.c:1000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/ebooks/metadata/sources/covers.py", line 42, in run
    self.plugin.download_cover(self.log, self.rq, self.abort,
  File "/usr/lib/calibre/calibre/ebooks/metadata/sources/big_book_search.py", line 43, in download_cover
    urls = get_urls(br, tokens)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/calibre/calibre/ebooks/metadata/sources/big_book_search.py", line 18, in get_urls
    raw = br.open(url).read()
          ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mechanize/_mechanize.py", line 257, in open
    return self._mech_open(url_or_request, data, timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mechanize/_mechanize.py", line 287, in _mech_open
    response = UserAgentBase.open(self, request, data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mechanize/_opener.py", line 193, in open
    response = urlopen(self, req, data)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mechanize/_urllib2_fork.py", line 431, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mechanize/_urllib2_fork.py", line 420, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib/calibre/calibre/utils/browser.py", line 28, in https_open
    return self.do_open(conn_factory, req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mechanize/_urllib2_fork.py", line 1246, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'bigbooksearch.com'. (_ssl.c:1000)> 

********************************************************************************
gadzuuks is offline   Reply With Quote