mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
Handle malformed data from NYT
This commit is contained in:
parent
0f4c2c23bd
commit
416986eb76
2 changed files with 2 additions and 2 deletions
|
|
@ -203,7 +203,7 @@ def parse_todays_page(self):
|
|||
m = pat.search(key)
|
||||
grouping, container, relation = map(int, m.groups())
|
||||
asset = sdata['asset']
|
||||
if asset['typename'] == 'Article' and grouping == 0:
|
||||
if asset and asset['typename'] == 'Article' and grouping == 0:
|
||||
if container not in sections:
|
||||
sections[container] = []
|
||||
sections[container].append(asset['id'].split(':', 1)[1])
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ def parse_todays_page(self):
|
|||
m = pat.search(key)
|
||||
grouping, container, relation = map(int, m.groups())
|
||||
asset = sdata['asset']
|
||||
if asset['typename'] == 'Article' and grouping == 0:
|
||||
if asset and asset['typename'] == 'Article' and grouping == 0:
|
||||
if container not in sections:
|
||||
sections[container] = []
|
||||
sections[container].append(asset['id'].split(':', 1)[1])
|
||||
|
|
|
|||
Loading…
Reference in a new issue