mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
...
This commit is contained in:
parent
7336a7a91d
commit
656f0e967e
@ -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 + ']'
|
||||
|
@ -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 + ']'
|
||||
|
Loading…
x
Reference in New Issue
Block a user