This commit is contained in:
unkn0w7n 2024-07-23 12:16:44 +05:30
parent 402b952f4d
commit c6dab38b83
4 changed files with 14 additions and 4 deletions

View File

@ -81,6 +81,19 @@ class TheAtlantic(BasicNewsRecipe):
language = 'en'
encoding = 'utf-8'
recipe_specific_options = {
'date': {
'short': 'The date of the edition to download (YYYY/MM format)',
'long': 'For example, 2024/05'
}
}
def __init__(self, *args, **kwargs):
BasicNewsRecipe.__init__(self, *args, **kwargs)
d = self.recipe_specific_options.get('date')
if d and isinstance(d, str):
self.INDEX = 'https://www.theatlantic.com/magazine/toc/' + d + '/'
keep_only_tags = [
dict(itemprop=['headline']),
classes(

View File

@ -72,7 +72,7 @@ class Harpers(BasicNewsRecipe):
edition = self.recipe_specific_options.get('date')
if edition and isinstance(edition, str):
url = 'https://harpers.org/archive/' + edition
self.timefmt = ' [' +edition + ']'
self.timefmt = ' [' + edition + ']'
soup = self.index_to_soup(url)
cov_div = soup.find('div', attrs={'class':'issue-cover'})

View File

@ -39,8 +39,6 @@ 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'}

View File

@ -57,7 +57,6 @@ class ht(BasicNewsRecipe):
self.timefmt = ' [%s]' % today
day, month, year = (int(x) for x in today.split('/'))
today = today.replace('/', '%2F')
get_edition = index + '/Home/GetEditionSupplementHierarchy?EditionDate=' + today