Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Jan 5, 2025
1 parent d2ff5bb commit bff5e92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion recipes/livemint.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# vim:fileencoding=utf-8
import json
import re
from datetime import date

from calibre.web.feeds.news import BasicNewsRecipe, classes

Expand Down
6 changes: 3 additions & 3 deletions recipes/lwn_weekly.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ lwn.net
import re
import sys

from calibre.web.feeds.news import BasicNewsRecipe
from calibre.utils.date import now as nowf
from calibre.web.feeds.news import BasicNewsRecipe


class WeeklyLWN(BasicNewsRecipe):
Expand Down Expand Up @@ -85,9 +85,9 @@ class WeeklyLWN(BasicNewsRecipe):

def publication_date(self):
return self.pub_date

def parse_publication_date(self, soup):
from dateutil.parser import parse, ParserError
from dateutil.parser import ParserError, parse
try:
date_match = re.match(r'.* +for +([^\[]*)', self.tag_to_string(soup.head.title.string))
# dateutil.parser.parse() is considered thread-safe
Expand Down

0 comments on commit bff5e92

Please sign in to comment.