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, 08:31 AM   #1
Glenn680
Member
Glenn680 began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jan 2024
Device: Sony PRS-350, Sony PRS-650
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, 10: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: 44,650
Karma: 24495948
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 offline   Reply With Quote
Advert
Old 01-30-2024, 12:07 AM   #3
unkn0wn
Fanatic
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: 562
Karma: 82944
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, 12:34 PM   #4
Glenn680
Member
Glenn680 began at the beginning.
 
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.
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 10:55 AM
Recipe for Het Laatste Nieuws (Belgian newspaper) based on built in recipe of Darko M erkfuizfeuadjfjz Recipes 0 02-17-2017 04:11 PM
Recipe voor De Tijd (Belgian newspaper) based on built in recipe of Darko Miletic erkfuizfeuadjfjz Recipes 0 02-17-2017 03:43 PM
Calibre News Recipe not downloading multiple page articles Raptor Recipes 0 02-03-2015 01:29 AM
Calibre recipe for daily Portuguese newspaper "Correio da Manhã" jmst Recipes 2 11-01-2010 02:01 PM


All times are GMT -4. The time now is 05:08 AM.


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