如:
pageSoup = BeautifulSoup(PageStr,'lxml')
divSection = pageSoup.select('#somepage')
for i in divSection.find('tr') #这里如何判断 tr 段的属性,有无 name 和 class 这两个属性,而不管属性值,如果有 name 和 class 属性才为目标...
如:
pageSoup = BeautifulSoup(PageStr,'lxml')
divSection = pageSoup.select('#somepage')
for i in divSection.find('tr') #这里如何判断 tr 段的属性,有无 name 和 class 这两个属性,而不管属性值,如果有 name 和 class 属性才为目标...