mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
pep8
This commit is contained in:
parent
f76b8307a5
commit
03cc258c25
@ -77,7 +77,6 @@ class TheWire(BasicNewsRecipe):
|
||||
now = datetime.now(datetime.timezone.utc) # Ensure 'now' is offset-aware
|
||||
post_date = datetime.strptime(b['post_date'], '%Y-%m-%d %H:%M:%S').replace(tzinfo=datetime.timezone.utc) # Make 'post_date' offset-aware
|
||||
if (now - post_date).days > self.oldest_article:
|
||||
self.log('Skipping', title, 'as it is too old')
|
||||
continue
|
||||
title = b['post_title']
|
||||
desc = b['post_excerpt']
|
||||
|
@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
'''
|
||||
zaobao.com.sg
|
||||
"""
|
||||
'''
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe, classes
|
||||
|
||||
@ -23,10 +23,10 @@ class ZAOBAO(BasicNewsRecipe):
|
||||
resolve_internal_links = True
|
||||
remove_empty_feeds = True
|
||||
|
||||
extra_css = """
|
||||
extra_css = '''
|
||||
.calibre-nuked-tag-figcaption {font-size:small; text-align:center; }
|
||||
img {display:block; margin:0 auto;}
|
||||
"""
|
||||
'''
|
||||
|
||||
def get_cover_url(self):
|
||||
soup = self.index_to_soup(
|
||||
|
@ -389,7 +389,7 @@ class FFMLProcessor:
|
||||
if tree.node_kind() == NodeKinds.BLANK_LINE:
|
||||
result += '\n\n'
|
||||
elif tree.node_kind() == NodeKinds.BOLD_TEXT:
|
||||
indent_text(("\\ " if result.endswith("?") else "") + f'**{tree.text()}**')
|
||||
indent_text(('\\ ' if result.endswith('?') else '') + f'**{tree.text()}**')
|
||||
elif tree.node_kind() == NodeKinds.CHARACTER:
|
||||
result += tree.text()
|
||||
elif tree.node_kind() == NodeKinds.CODE_BLOCK:
|
||||
|
Loading…
x
Reference in New Issue
Block a user