![]() |
#1 |
Member
![]() Posts: 19
Karma: 10
Join Date: Jan 2024
Device: Sony PRS-350, Sony PRS-650
|
![]()
Hi All, new to the forum and there's some great information here.
Is there a way to pull the front newspaper image as part of the Calibre recipe? I see this built in to the NY Times recipe, but not for the Minneapolis Star Tribune. As an example, how would I write the recipe to pull the front page daily from here: https://www.frontpages.com/star-tribune/ For full transparency, I'm a paying subscriber to this publication. Thanks for your advice in advance. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,234
Karma: 23446430
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You implement the get_cover_url() method in your recipe class to eturn a url to whatever image you want to use as the cover.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 512
Karma: 82764
Join Date: May 2021
Device: kindle
|
i implemented this for ft
Code:
def get_cover_url(self): soup = self.index_to_soup('https://www.frontpages.com/financial-times/') return 'https://www.frontpages.com' + soup.find('img', attrs={'id':'giornale-img'})['src'] |
![]() |
![]() |
![]() |
#4 |
Member
![]() Posts: 19
Karma: 10
Join Date: Jan 2024
Device: Sony PRS-350, Sony PRS-650
|
This worked with star-tribune, many thanks for your help.
One other question, what recipe command would scale the cover not to appear so broadly on the device? Currently it is very short and fat, is there a command that would scale the cover image more appropriately? Thanks again in advance. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre 4 for Windows 7 seems fine, why front page says no? | Peter Blaise | Calibre | 7 | 04-12-2020 09:55 AM |
Recipe for Het Laatste Nieuws (Belgian newspaper) based on built in recipe of Darko M | erkfuizfeuadjfjz | Recipes | 0 | 02-17-2017 03:11 PM |
Recipe voor De Tijd (Belgian newspaper) based on built in recipe of Darko Miletic | erkfuizfeuadjfjz | Recipes | 0 | 02-17-2017 02:43 PM |
Calibre News Recipe not downloading multiple page articles | Raptor | Recipes | 0 | 02-03-2015 12:29 AM |
Calibre recipe for daily Portuguese newspaper "Correio da Manhã" | jmst | Recipes | 2 | 11-01-2010 01:01 PM |