Update youdao.py

判断 同根词 值 屏蔽 返回的错误值
This commit is contained in:
WorkTimer 2019-02-25 11:47:00 +08:00 committed by GitHub
parent d50d412543
commit 16947d457a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,7 +145,10 @@ class Youdao(WebService):
@export([u'同根词', u'Related words'])
def fld_rel_word(self):
return self._get_singledict('rel_word')
val = self._get_singledict('rel_word')
if val is None or val == '' or u'词根:${rel_word.getStem()}' in str(val):
return ' '
return val
@export([u'同近义词', u'Synonyms'])
def fld_syno(self):