The problem is most likely with this line if not _a.string is None:
.
If _dev.find('a')
does not find what you're looking for it returns None
. Since you assigned the value to _a
, that means you are calling None.string
on that line, which will definitely raise an error.
Change that line to this:
if _a and not _a.string is None:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…