Skip to content

Commit

Permalink
Change download URL
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lbschenkel committed Feb 4, 2024
1 parent 10c1990 commit 97c07e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 97c07e0

Please sign in to comment.