[Python] Find all "a" tags in multiple divs with same class with BeautifulSoup

Discussão em 'Python' iniciado por Stack, Novembro 20, 2024.

  1. Stack

    Stack Membro Participativo

    I want to find all "a" elemnts in multiple divs with same class.

    from bs4 import BeautifulSoup
    links = soup.find_all("div", class_="va-columns").find_all("a")


    but this doesnt work and gives me an error. Can someone help me? Im trying to find all links on the main content of a website.

    Continue reading...

Compartilhe esta Página