This commit is contained in:
unkn0w7n 2024-12-07 21:47:50 +05:30
parent 7f3539ea65
commit b947f1ece8
3 changed files with 12 additions and 3 deletions

View File

@ -230,7 +230,7 @@ class Economist(BasicNewsRecipe):
recipe_specific_options = {
'date': {
'short': 'The date of the edition to download (YYYY-MM-DD format)',
'long': 'For example, 2024-07-19\nThis seems to work only for a couple of past editions.',
'long': 'For example, 2024-07-19',
},
'res': {
'short': 'For hi-res images, select a resolution from the\nfollowing options: 834, 960, 1096, 1280, 1424',

View File

@ -230,7 +230,7 @@ class Economist(BasicNewsRecipe):
recipe_specific_options = {
'date': {
'short': 'The date of the edition to download (YYYY-MM-DD format)',
'long': 'For example, 2024-07-19\nThis seems to work only for a couple of past editions.',
'long': 'For example, 2024-07-19',
},
'res': {
'short': 'For hi-res images, select a resolution from the\nfollowing options: 834, 960, 1096, 1280, 1424',

View File

@ -42,7 +42,7 @@ class Substack(BasicNewsRecipe):
'auths': {
'short': 'enter the @handles you subscribe to:\nseperated by a space',
'long': '@julianmacfarlane @simplicius76 .... ....',
'default': '@julianmacfarlane @simplicius76 @caitlinjohnstone @michaelmoore @seymourhersh @robertreich',
'default': '@julianmacfarlane @simplicius76 @caitlinjohnstone @michaelmoore @seymourhersh @geopolitiq',
},
'days': {
'short': 'Oldest article to download from this news source. In days ',
@ -54,6 +54,11 @@ class Substack(BasicNewsRecipe):
'long': 'This is useful for non e-ink devices, and for a lower file size\nthan the default, use 400 or 300.',
'default': '600',
},
'rev': {
'short': 'Reverse the order of articles in each feed?',
'long': 'enter yes',
'default': 'no',
},
}
def __init__(self, *args, **kwargs):
@ -61,6 +66,10 @@ class Substack(BasicNewsRecipe):
d = self.recipe_specific_options.get('days')
if d and isinstance(d, str):
self.oldest_article = float(d)
r = self.recipe_specific_options.get('rev')
if r and isinstance(r, str):
if r.lower().strip() == 'yes':
self.reverse_article_order = True
# Every Substack publication has an RSS feed at https://{name}.substack.com/feed.
# The same URL provides either all posts, or all free posts + previews of paid posts,