mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
pep8
This commit is contained in:
parent
d2ff5bb2dd
commit
bff5e922ae
@ -2,7 +2,6 @@
|
|||||||
# vim:fileencoding=utf-8
|
# vim:fileencoding=utf-8
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
from datetime import date
|
|
||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe, classes
|
from calibre.web.feeds.news import BasicNewsRecipe, classes
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@ lwn.net
|
|||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
|
||||||
from calibre.utils.date import now as nowf
|
from calibre.utils.date import now as nowf
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
|
||||||
class WeeklyLWN(BasicNewsRecipe):
|
class WeeklyLWN(BasicNewsRecipe):
|
||||||
@ -87,7 +87,7 @@ class WeeklyLWN(BasicNewsRecipe):
|
|||||||
return self.pub_date
|
return self.pub_date
|
||||||
|
|
||||||
def parse_publication_date(self, soup):
|
def parse_publication_date(self, soup):
|
||||||
from dateutil.parser import parse, ParserError
|
from dateutil.parser import ParserError, parse
|
||||||
try:
|
try:
|
||||||
date_match = re.match(r'.* +for +([^\[]*)', self.tag_to_string(soup.head.title.string))
|
date_match = re.match(r'.* +for +([^\[]*)', self.tag_to_string(soup.head.title.string))
|
||||||
# dateutil.parser.parse() is considered thread-safe
|
# dateutil.parser.parse() is considered thread-safe
|
||||||
|
Loading…
x
Reference in New Issue
Block a user