From 97c07e0c0c864001fe7091e9b8d1d8435e435ffa Mon Sep 17 00:00:00 2001 From: Leonardo Brondani Schenkel Date: Sun, 4 Feb 2024 16:47:35 +0100 Subject: [PATCH] Change download URL It looks like the following Amazon domains no longer work: - `z2-ec2.images-amazon.com`: "invalid hostname" error - `s3.cn-north-1.amazonaws.com.cn`: "access denied" error After some experimentation it was determined that covers are now being served under the `ec2.images-amazon.com` domain. This commit adds the new URL and removes the non-working ones. --- __init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index ca9661c..83652c0 100644 --- a/__init__.py +++ b/__init__.py @@ -36,8 +36,10 @@ def download_cover(self, log, result_queue, abort, def get_cover_urls(log, title, authors, identifiers, timeout): sources = frozenset([ - 'http://z2-ec2.images-amazon.com/images/P/{0}.01.MAIN._SCRM_.jpg', - 'https://s3.cn-north-1.amazonaws.com.cn/sitbweb-cn/content/{0}/images/cover.jpg', + 'https://ec2.images-amazon.com/images/P/{0}.01.MAIN._SCRM_.jpg', + # No longer seem to work as of 2024-02-04: + #'http://z2-ec2.images-amazon.com/images/P/{0}.01.MAIN._SCRM_.jpg', + #'https://s3.cn-north-1.amazonaws.com.cn/sitbweb-cn/content/{0}/images/cover.jpg', ]) urls = set() asins = set()