Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 01-29-2024, 07:31 AM   #1
Glenn680
Junior Member
Glenn680 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2024
Device: Sony PRS-350
Smile Calibre Recipe: Newspaper Front Page

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.
Glenn680 is offline   Reply With Quote
Old 01-29-2024, 09:02 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
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.
kovidgoyal is online now   Reply With Quote
Old 01-29-2024, 11:07 PM   #3
unkn0wn
Evangelist
unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.
 
Posts: 445
Karma: 82686
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']
but i see no built in recipe for startribune.
unkn0wn is offline   Reply With Quote
Old 03-05-2024, 11:34 AM   #4
Glenn680
Junior Member
Glenn680 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2024
Device: Sony PRS-350
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.
Glenn680 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 11:45 PM.


MobileRead.com is a privately owned, operated and funded community.