![]() |
#1 |
Connoisseur
![]() Posts: 56
Karma: 16
Join Date: Feb 2015
Device: Kindle Paperwhite
|
Economist recipe cover page is blank
The Economist recipe cover page shows up blank. Thanks.
|
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,521
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Works for me
|
![]() |
![]() |
![]() |
#3 |
Member
![]() Posts: 14
Karma: 10
Join Date: Mar 2025
Device: Kindle
|
Hi I have the same issue.
The cover under US is about Israel. Failed to download cover Traceback (most recent call last): File "calibre/web/feeds/news.py", line 1442, in download_cover File "calibre/web/feeds/news.py", line 1436, in _download_cover File "calibre/utils/img.py", line 302, in save_cover_data_to File "calibre/utils/img.py", line 205, in image_to_data ValueError: Failed to export image as JPEG with error: Image is empty |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,521
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That error indicates the server is sending an empty cover image, probably it will be fixed next week automatically, if not let me know.
|
![]() |
![]() |
![]() |
#5 |
onlinenewsreader.net
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 330
Karma: 10143
Join Date: Dec 2009
Location: Phoenix, AZ & Victoria, BC
Device: Kindle 3, Kindle Fire, IPad3, iPhone4, Playbook, HTC Inspire
|
This is weird ...
The same issue arises with Javascript-based retrieval, although the response seen is "forbidden." Of course the result is also blank, so I suspect Python is not reporting the forbidden status.
The weird thing is, if the url is constructed rater than extracted from the JSON structure, the image is retrieved successfully. I modified the economist recipe as follows. Code:
self.cover_url = ( safe_dict(data, 'props', 'pageProps', 'content', 'cover', 'url') .replace( 'economist.com/', 'economist.com/cdn-cgi/image/width=960,quality=80,format=auto/', ) .replace('SQ_', '') ) self.log('Got embedded cover:', self.cover_url) #from datetime import datetime #issueDate = datetime.fromisoformat(safe_dict(data, 'props', 'pageProps', 'content', 'issueDate').replace('Z', '+00:00')).strftime("%Y%m%d") #self.cover_url = 'https://www.economist.com/cdn-cgi/image/width=960,quality=80,format=auto/content-assets/images/' + issueDate + '_DE_US.jpg' #self.log('Got constructed cover:', self.cover_url) Code:
Got embedded cover: https://www.economist.com/cdn-cgi/image/width=960,quality=80,format=auto/content-assets/images/29250920_DE_US.jpg Got constructed cover: https://www.economist.com/cdn-cgi/image/width=960,quality=80,format=auto/content-assets/images/20250920_DE_US.jpg Very strange indeed. If anyone has a theory as to what's happening, let's hear it. |
![]() |
![]() |
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,521
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Your two URLs are not the same, the filename parts are different.
|
![]() |
![]() |
![]() |
#7 |
onlinenewsreader.net
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 330
Karma: 10143
Join Date: Dec 2009
Location: Phoenix, AZ & Victoria, BC
Device: Kindle 3, Kindle Fire, IPad3, iPhone4, Playbook, HTC Inspire
|
Yes I see that now. So the embedded url is wrong which is why it doesn't work. I suppose that might get fixed at some point, but until then no economist cover pages will show until the code is modified to remove this fault.
|
![]() |
![]() |
![]() |
Tags |
economist |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil adding blank page after cover image | ebookn00b | Sigil | 32 | 06-20-2013 01:44 PM |
Script to scrape page for a cover image for recipe? | adoucette | Recipes | 12 | 02-29-2012 06:24 PM |
better cover for Economist recipe | davide125 | Recipes | 5 | 11-12-2011 12:33 PM |
EPUB Creation: Cover Page blank in ADE | Janephew91 | ePub | 4 | 09-29-2011 04:18 PM |
blank page for cover after converting | crestfalleen | Calibre | 2 | 06-03-2010 12:08 PM |