This commit is contained in:
unkn0w7n 2025-04-03 22:07:06 +05:30
parent 7336a7a91d
commit 656f0e967e
2 changed files with 6 additions and 2 deletions

View File

@ -277,6 +277,8 @@ class Economist(BasicNewsRecipe):
if d and isinstance(d, str):
if d.lower().strip() == 'yes':
self.from_archive = False
elif d.lower().strip() == 'no':
self.from_archive = True
needs_subscription = False
@ -376,7 +378,7 @@ class Economist(BasicNewsRecipe):
# data = json.loads(raw)['data']['section']
# else:
# data = json.loads(raw)['data']['canonical']['hasPart']['parts'][0]
data = json.loads(raw)['data']['canonical']['hasPart']['parts'][0]
data = json.loads(raw)['data']['section']
dt = datetime.fromisoformat(data['datePublished'][:-1]) + timedelta(seconds=time.timezone)
dt = dt.strftime('%b %d, %Y')
self.timefmt = ' [' + dt + ']'

View File

@ -277,6 +277,8 @@ class Economist(BasicNewsRecipe):
if d and isinstance(d, str):
if d.lower().strip() == 'yes':
self.from_archive = False
elif d.lower().strip() == 'no':
self.from_archive = True
needs_subscription = False
@ -376,7 +378,7 @@ class Economist(BasicNewsRecipe):
# data = json.loads(raw)['data']['section']
# else:
# data = json.loads(raw)['data']['canonical']['hasPart']['parts'][0]
data = json.loads(raw)['data']['canonical']['hasPart']['parts'][0]
data = json.loads(raw)['data']['section']
dt = datetime.fromisoformat(data['datePublished'][:-1]) + timedelta(seconds=time.timezone)
dt = dt.strftime('%b %d, %Y')
self.timefmt = ' [' + dt + ']'