From a22794e63ea17884750508a5afeef4d6fbefce9e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 17 Jun 2024 10:35:04 +0530 Subject: [PATCH] pep8 --- recipes/reuters.recipe | 5 +++-- recipes/wsj.recipe | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/reuters.recipe b/recipes/reuters.recipe index d5e8eed538..417d40a9e2 100644 --- a/recipes/reuters.recipe +++ b/recipes/reuters.recipe @@ -5,6 +5,7 @@ from datetime import datetime, timedelta from calibre.ebooks.BeautifulSoup import BeautifulSoup from calibre.web.feeds.news import BasicNewsRecipe + def p_dt(x): dt = datetime.fromisoformat(x[:-1]) + timedelta(seconds=time.timezone) return dt.strftime('%b %d, %Y, %I:%M %p') @@ -39,7 +40,7 @@ class Reuters(BasicNewsRecipe): feed_api = index + '/arc/outboundfeeds/v3/mobile/section/{}/?from=0&size=50&outputType=json' path_api = index + '/arc/outboundfeeds/v3/mobile{}?outputType=json' sections = [ - 'world', 'business', 'markets','sustainability', 'legal', + 'world', 'business', 'markets','sustainability', 'legal', 'breakingviews', 'technology', 'sports', 'science', 'lifestyle' ] @@ -52,7 +53,7 @@ class Reuters(BasicNewsRecipe): articles = [] data = json.loads(self.index_to_soup(feed_api.format(sec), raw=True))['wireitems'] - + for x in data: if x.get('wireitem_type', '') == 'story': for y in x['templates']: diff --git a/recipes/wsj.recipe b/recipes/wsj.recipe index 65465bd28d..ed94662d83 100644 --- a/recipes/wsj.recipe +++ b/recipes/wsj.recipe @@ -1,7 +1,7 @@ import json import time -from itertools import zip_longest from datetime import datetime, timedelta +from itertools import zip_longest from calibre.ebooks.BeautifulSoup import BeautifulSoup from calibre.web.feeds.news import BasicNewsRecipe, classes