I have this prettify html
<a href="somepath">
Text1
</a>
<span>
|
</span>
<a href="somepath">
Text2
</a>
<span>
|
</span>
<a href="somepath">
Text3
</a>
I used this code:
cnta= len(res.findAll('a'))-1 //I used -1 because I have one extra a tag
cnt = 0
while cnt<cnta:
res2 = res.find('a').text
cnt+=1
print res2
I want to take all 3 Texts but the result is 3 times "Text1"... I know that I not saying anyone to go to next but I don't know how to do it