mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
402b952f4d
commit
c6dab38b83
@ -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(
|
||||
|
@ -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'})
|
||||
|
@ -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'}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user