[Python] Iterating through tags in Python

Discussão em 'Python' iniciado por Stack, Julho 8, 2025.

  1. Stack

    Stack Membro Participativo

    I am iterating through meta tags in Python with the aim of printing them to the console.

    for i in soup.head:
    print(soup.meta)


    The problem I'm having is that the code is printing the very first meta tag it reads for every instance of tag that it finds. How can I increment the soup.meta to print the next tag?

    Continue reading...

Compartilhe esta Página