This commit is contained in:
Kovid Goyal 2024-01-04 14:04:51 +05:30
parent 0f5b6c523c
commit adfc877853
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 4 deletions

View File

@ -3,7 +3,6 @@
from __future__ import absolute_import, division, print_function, unicode_literals
import json
import re
from pprint import pformat
from calibre.web.feeds.news import BasicNewsRecipe

View File

@ -2,7 +2,7 @@
# vim:fileencoding=utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
import json, re
import json
from datetime import date
from pprint import pformat
@ -52,7 +52,7 @@ def parse_body(item):
c = item['cntnt']
if item.get('type') == 'inline':
if c.get('cmsType') == 'listicle':
if 'title' in c:
if 'title' in c:
yield '<h3>' + escape(c['title']) + '</h3>'
yield c['text']
elif c.get('cmsType') == 'image':
@ -60,7 +60,7 @@ def parse_body(item):
yield line
elif c.get('cmsType') == 'imagegroup':
for imgs in c['images']:
for line in parse_lead_image(imgs):
for line in parse_lead_image(imgs):
yield line
elif c.get('cmsType') == 'pullquote':
if 'quote' in c: