From c4df98f9af4ab1445ad3eebb91669f8615da5d3e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 31 Mar 2024 17:51:17 +0530 Subject: [PATCH] pep8 --- recipes/globaltimes.recipe | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/globaltimes.recipe b/recipes/globaltimes.recipe index a1a78e36f8..608d726a89 100644 --- a/recipes/globaltimes.recipe +++ b/recipes/globaltimes.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes from datetime import datetime, timedelta, timezone + from calibre.utils.date import parse_date +from calibre.web.feeds.news import BasicNewsRecipe, classes index = 'https://www.globaltimes.cn/' @@ -41,7 +42,7 @@ class GlobalTimes(BasicNewsRecipe): def preprocess_html(self, soup): h1 = soup.find(attrs={'class':'article_title'}) if h1: - h1.name = 'h1' + h1.name = 'h1' for div in soup.findAll(attrs={'class':'picture'}): div.name = 'div' p = soup.find(attrs={'class':'author_share_left'}) @@ -92,4 +93,3 @@ class GlobalTimes(BasicNewsRecipe): self.log('\t', title, '\n\t', desc, '\n\t\t', url) ans.append({'title': title, 'url': url, 'description': desc}) return ans - \ No newline at end of file