How to use the tag obtained by soup.find_all(True) in soup?

12 views
Skip to first unread message

eri sak

unread,
Mar 13, 2023, 5:59:28 AM3/13/23
to beautifulsoup
How to use the tag obtained by soup.find_all(True) in soup? It is wrong to use like below, I don't know how to pass the tag, thanks for your help

def get_all_siblings(soup):
    tag_list = soup.find_all(True)
    tag = tag_list[0].name
    print(soup.tag.next_siblings)
Reply all
Reply to author
Forward
0 new messages