Fix bug that add duplicate phrase field to def-block when query word like 'charge'(Cambridge).

This commit is contained in:
Javan Zhu 2019-04-12 22:05:26 +08:00
parent bb9e2360e8
commit 5533c5d783

View File

@ -82,11 +82,11 @@ class Cambridge(WebService):
if sense_body:
l = result['def_list']
phrase = None
for block in sense_body:
if isinstance(block, Tag) is not True:
continue
phrase = None
block_type = block['class'][0]
if block_type == 'def-block':
pass