mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
0f5b6c523c
commit
adfc877853
@ -3,7 +3,6 @@
|
|||||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import re
|
|
||||||
from pprint import pformat
|
from pprint import pformat
|
||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# vim:fileencoding=utf-8
|
# vim:fileencoding=utf-8
|
||||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||||
|
|
||||||
import json, re
|
import json
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from pprint import pformat
|
from pprint import pformat
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ def parse_body(item):
|
|||||||
c = item['cntnt']
|
c = item['cntnt']
|
||||||
if item.get('type') == 'inline':
|
if item.get('type') == 'inline':
|
||||||
if c.get('cmsType') == 'listicle':
|
if c.get('cmsType') == 'listicle':
|
||||||
if 'title' in c:
|
if 'title' in c:
|
||||||
yield '<h3>' + escape(c['title']) + '</h3>'
|
yield '<h3>' + escape(c['title']) + '</h3>'
|
||||||
yield c['text']
|
yield c['text']
|
||||||
elif c.get('cmsType') == 'image':
|
elif c.get('cmsType') == 'image':
|
||||||
@ -60,7 +60,7 @@ def parse_body(item):
|
|||||||
yield line
|
yield line
|
||||||
elif c.get('cmsType') == 'imagegroup':
|
elif c.get('cmsType') == 'imagegroup':
|
||||||
for imgs in c['images']:
|
for imgs in c['images']:
|
||||||
for line in parse_lead_image(imgs):
|
for line in parse_lead_image(imgs):
|
||||||
yield line
|
yield line
|
||||||
elif c.get('cmsType') == 'pullquote':
|
elif c.get('cmsType') == 'pullquote':
|
||||||
if 'quote' in c:
|
if 'quote' in c:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user