def get_solution(self, tag):
'''['????', '????', 'CVE??'] '''
value = []
tr_lst = tag.table.contents
for i in tr_lst:
if type(i) is NavigableString:
continue
if i.th.string in (u'????', u'????'):
val = [i.strip() for i in i.td.strings]
val = '\n'.join(val).replace('\n*', '*')
value.append(val)
elif i.th.string == u'CVE??':
value.append(i.td.string)
if len(value) == 2:
value.append(None)
return value
评论列表
文章目录