diff --git a/recipes/hindu.recipe b/recipes/hindu.recipe index b9379bdb68..4dbb83bed2 100644 --- a/recipes/hindu.recipe +++ b/recipes/hindu.recipe @@ -34,7 +34,12 @@ class TheHindu(BasicNewsRecipe): recipe_specific_options = { 'location': { 'short': 'The name of the local edition', - 'long': 'If The Hindu is available in your local town/city,\nset this to your location, for example, hyderabad\nAvailable Editions: bengaluru, chennai, coimbatore, delhi, erode, hyderabad, international, kochi, kolkata,\nkozhikode, madurai, mangalore, mumbai, thiruvananthapuram, tiruchirapalli, vijayawada, visakhapatnam', + 'long': ('If The Hindu is available in your local town/city,\n' + 'set this to your location, for example, hyderabad\n' + 'Available Editions: bengaluru, chennai, coimbatore, delhi, ' + 'erode, hyderabad, international, kochi, kolkata,\n' + 'kozhikode, madurai, mangalore, mumbai, thiruvananthapuram, ' + 'tiruchirapalli, vijayawada, visakhapatnam'), 'default': 'international' }, 'date': { diff --git a/recipes/hindufeeds.recipe b/recipes/hindufeeds.recipe index 94b00acc88..dd6c5d39a2 100644 --- a/recipes/hindufeeds.recipe +++ b/recipes/hindufeeds.recipe @@ -39,6 +39,8 @@ class TheHindufeeds(BasicNewsRecipe): d = self.recipe_specific_options.get('days') if d and isinstance(d, str): self.oldest_article = float(d) + if self.output_profile.short_name.startswith('kindle'): + self.title = 'The Hindu (Feeds) ' + date.today().strftime('%b %d, %Y') ignore_duplicate_articles = {'url'} @@ -76,14 +78,9 @@ class TheHindufeeds(BasicNewsRecipe): src.extract() return soup - def __init__(self, *args, **kwargs): - BasicNewsRecipe.__init__(self, *args, **kwargs) - if self.output_profile.short_name.startswith('kindle'): - self.title = 'The Hindu (Feeds) ' + date.today().strftime('%b %d, %Y') - def get_cover_url(self): - soup = self.index_to_soup('https://www.thehindu.com/todays-paper/') + soup = self.index_to_soup('https://www.thehindu.com/todays-paper/') if cover := soup.find(attrs={'class':'hindu-ad'}): return cover.img['src'] diff --git a/recipes/hindustan_times_print.recipe b/recipes/hindustan_times_print.recipe index 94bf2db993..ea74c099f2 100644 --- a/recipes/hindustan_times_print.recipe +++ b/recipes/hindustan_times_print.recipe @@ -6,7 +6,6 @@ from datetime import date from calibre.web.feeds.news import BasicNewsRecipe - index = 'https://epaper.hindustantimes.com' class ht(BasicNewsRecipe): @@ -27,7 +26,11 @@ class ht(BasicNewsRecipe): recipe_specific_options = { 'location': { 'short': 'The name of the local edition', - 'long': 'If The Hindustan Times is available in your local town/city,\nset this to your location, for example, Delhi\nAvailable Editions: Delhi, Mumbai, Chandigarh, Lucknow, Patna, Bengaluru, Pune, Gurgaon, Ludhiana, Rajasthan, Amritsar,\nEast UP, Haryana, Jammu, Navi Mumbai, Noida, Punjab, Ranchi, Thane, Uttarakhand, West UP', + 'long': ('If The Hindustan Times is available in your local town/city,\n' + 'set this to your location, for example, Delhi\nAvailable Editions:' + 'Delhi, Mumbai, Chandigarh, Lucknow, Patna, Bengaluru, Pune, Gurgaon,' + 'Ludhiana, Rajasthan, Amritsar,\nEast UP, Haryana, Jammu, Navi Mumbai,' + 'Noida, Punjab, Ranchi, Thane, Uttarakhand, West UP'), 'default': 'Delhi' }, 'date': { @@ -55,7 +58,6 @@ class ht(BasicNewsRecipe): self.timefmt = ' [%s]' % today day, month, year = (int(x) for x in today.split('/')) - dt = date(year, month, day) today = today.replace('/', '%2F') get_edition = index + '/Home/GetEditionSupplementHierarchy?EditionDate=' + today diff --git a/recipes/livemint.recipe b/recipes/livemint.recipe index eba947ede0..60e7cf6fae 100644 --- a/recipes/livemint.recipe +++ b/recipes/livemint.recipe @@ -49,7 +49,7 @@ class LiveMint(BasicNewsRecipe): return cov['HighResolution'] if is_saturday: - self.title = 'Mint Lounge' + title = 'Mint Lounge' masthead_url = 'https://lifestyle.livemint.com/mintlounge/static-images/lounge-logo.svg' oldest_article = 6.5 # days