From 400c74569280e2eb5d48cfd32761a24224ae0ec9 Mon Sep 17 00:00:00 2001 From: Russell Troxel Date: Sun, 26 Nov 2023 14:31:24 -0800 Subject: [PATCH] Update KOBO_IMAGEHOST_URL to new CDN endpoint Kobo has introduced a vanity URL to their Akamai CDN config - "https://https://cdn.kobo.com". As a result, requests sent to the old raw Akamai endpoint now through 404s. This is a simple PR that updates to the new URL. This is visible in the config of a newly bought Kobo Sage (mine): ``` image_host=https://cdn.kobo.com/book-images/ image_url_quality_template=https://cdn.kobo.com/book-images/{ImageId}/{Width}/{Height}/{Quality}/{IsGreyscale}/image.jpg image_url_template=https://cdn.kobo.com/book-images/{ImageId}/{Width}/{Height}/false/image.jpg ``` Example: OLD: https://kbimages1-a.akamaihd.net/1abfb307-457b-4597-b2ea-74beb2eb1478/149/223/false/image.jpg (Throws 404) New: https://cdn.kobo.com/book-images/1abfb307-457b-4597-b2ea-74beb2eb1478/149/223/false/image.jpg (Renders Properly) fixes #2371 ref #2731 --- cps/kobo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/kobo.py b/cps/kobo.py index f215e5aa..b2b5989b 100644 --- a/cps/kobo.py +++ b/cps/kobo.py @@ -56,7 +56,7 @@ from .kobo_auth import requires_kobo_auth, get_auth_token KOBO_FORMATS = {"KEPUB": ["KEPUB"], "EPUB": ["EPUB3", "EPUB"]} KOBO_STOREAPI_URL = "https://storeapi.kobo.com" -KOBO_IMAGEHOST_URL = "https://kbimages1-a.akamaihd.net" +KOBO_IMAGEHOST_URL = "https://cdn.kobo.com/book-images/" SYNC_ITEM_LIMIT = 100