I want to extract data from 2 tags that are related. I have written code to extract the 1st tag.
html = driver.page_source
soup = BeautifulSoup(html)
for tag in soup.find_all(['a']):
print (tag.text)
I want to extract the 2nd tag in the same loop. How can I do this?