Closed hmgle closed 8 years ago
有道词典返回的翻译内容 节点有可能为空值,例如翻译 split 时 http://dict.youdao.com/fsearch?q=split :
split
... <translation> <content>vi. 离开;被劈开;断绝关系</content> </translation> <translation> <content></content> </translation> ...
这时会抛出 AttributeError: 'NoneType' object has no attribute 'encode' 的错误。
AttributeError: 'NoneType' object has no attribute 'encode'
有道词典返回的翻译内容 节点有可能为空值,例如翻译
split
时 http://dict.youdao.com/fsearch?q=split :这时会抛出
AttributeError: 'NoneType' object has no attribute 'encode'
的错误。