![]() |
#1 |
Member
![]() Posts: 23
Karma: 10
Join Date: Jan 2024
Device: Kobo
|
Update Newspaper Front Cover
Hi, created a simple recipe that would include the newspaper front page each day. However that newspaper front cover is no longer updated daily on the current site. So I found a new site to pull the newspaper cover which is updated daily- but the recipe is not working. Not sure what I'm doing wrong (?)
Previous recipe (worked well): def get_cover_url(self): soup = self.index_to_soup('https://www.frontpages.com/star-tribune/') return 'https://www.frontpages.com' + soup.find('img', attrs={'id':'giornale-img'})['src'] New recipe (not working): def get_cover_url(self): soup = self.index_to_soup('https://frontpages.freedomforum.org/newspapers/mn_st-Star_Tribune') return 'https://frontpages.freedomforum.org' + soup.find('img', attrs={'id':'giornale-img'})['src'] Please let me know how to fix. The new recipe only pulls a generic cover. Thanks. |
![]() |
![]() |
![]() |
#2 |
Member
![]() Posts: 23
Karma: 10
Join Date: Jan 2024
Device: Kobo
|
Re: Update Newspaper Front Cover
Haven't seen any responses, thinking (hoping) this is a simple fix I can make within the recipe. Any thoughts on this? Please let me know, thanks.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 13
Karma: 10
Join Date: May 2025
Device: sony PRS T3
|
Try this:
def get_cover_url(self): from calibre import strftime
cover = 'https://d2dr22b2lm4tvw.cloudfront.net/mn_st/' + strftime("%Y-%m-%d") + '/front-page-large.jpg' return cover |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre Recipe: Newspaper Front Page | Glenn680 | Recipes | 3 | 03-05-2024 11:34 AM |
PRS-650 using the touchscreen without the front cover. | temuchin | Sony Reader | 4 | 12-05-2013 11:24 PM |
PDF files get the front cover twice | bferrin | 1 | 04-20-2012 03:59 AM | |
Touch Front cover only? | rcrh | Barnes & Noble NOOK | 5 | 07-23-2011 02:19 AM |
Newspaper Update Time? | pengrus | Amazon Kindle | 4 | 02-27-2009 07:06 AM |