diff --git a/recipes/hindu.recipe b/recipes/hindu.recipe index c5e0c07801..9c82b8dd03 100644 --- a/recipes/hindu.recipe +++ b/recipes/hindu.recipe @@ -27,7 +27,7 @@ class TheHindu(BasicNewsRecipe): extra_css = ''' .caption {font-size:small; text-align:center;} .author, .dateLine {font-size:small; font-weight:bold;} - .subhead, .subhead_lead {font-weight:bold;} + .subhead, .subhead_lead, .bold {font-weight:bold;} img {display:block; margin:0 auto;} .italic {font-style:italic; color:#202020;} ''' diff --git a/recipes/icons/livemint.png b/recipes/icons/livemint.png index 68f745e747..3d4457826c 100644 Binary files a/recipes/icons/livemint.png and b/recipes/icons/livemint.png differ diff --git a/recipes/irish_times.recipe b/recipes/irish_times.recipe index 5574f975b9..b868d152da 100644 --- a/recipes/irish_times.recipe +++ b/recipes/irish_times.recipe @@ -39,6 +39,23 @@ class IrishTimes(BasicNewsRecipe): classes('sm-promo-headline top-table-list-container single-divider interstitial-link'), ] remove_attributes = ['width', 'height'] + + def get_cover_url(self): + from datetime import date + cover = 'https://img.kiosko.net/' + date.today().strftime('%Y/%m/%d') + '/ie/irish_times.750.jpg' + br = BasicNewsRecipe.get_browser(self, verify_ssl_certificates=False) + try: + br.open(cover) + except: + index = 'https://en.kiosko.net/ie/np/irish_times.html' + soup = self.index_to_soup(index) + for image in soup.find('img', attrs={'src': lambda x: x and x.endswith('750.jpg')}): + if image['src'].startswith('/'): + return 'https:' + image['src'] + return image['src'] + self.log("\nCover unavailable") + cover = None + return cover def parse_index(self): soup = self.index_to_soup('https://www.irishtimes.com/') diff --git a/recipes/irish_times_free.recipe b/recipes/irish_times_free.recipe index 7e150dfbef..cf1d16ae69 100644 --- a/recipes/irish_times_free.recipe +++ b/recipes/irish_times_free.recipe @@ -66,6 +66,15 @@ class IrishTimes(BasicNewsRecipe): pt.close() return pt.name + def __init__(self, *args, **kwargs): + BasicNewsRecipe.__init__(self, *args, **kwargs) + if self.output_profile.short_name.startswith('kindle'): + # Reduce image sizes to get file size below amazon's email + # sending threshold + self.web2disk_options.compress_news_images = True + self.web2disk_options.compress_news_images_auto_size = 5 + self.log.warn('Kindle Output profile being used, reducing image quality to keep file size below amazon email threshold') + feeds = [] sections = [ diff --git a/recipes/livemint.recipe b/recipes/livemint.recipe index 4b990afd37..584b701843 100644 --- a/recipes/livemint.recipe +++ b/recipes/livemint.recipe @@ -129,6 +129,8 @@ class LiveMint(BasicNewsRecipe): return raw def preprocess_html(self, soup): + for h2 in soup.find('h2'): + h2.name = 'p' for span in soup.findAll('figcaption'): span['id'] = 'img-cap' for auth in soup.findAll('span', attrs={'class':['articleInfo pubtime','articleInfo author']}):