[Python] How to scrape this using bs4

Discussão em 'Python' iniciado por Stack, Fevereiro 12, 2025.

  1. Stack

    Stack Membro Participativo

    I have to get <a class="last" aria-label="Last Page" href="https://webtoon-tr.com/webtoon/page/122/">Son »</a>. From this site:https://webtoon-tr.com/webtoon/

    But when i try to scrape it with this code:

    from bs4 import BeautifulSoup
    import requests

    url = "https://webtoon-tr.com/webtoon/"
    html = requests.get(url).content
    soup = BeautifulSoup(html,"html.parser")

    last = soup.find_all("a",{"class":"last"})
    print(last)


    It just returns me an empty list, and when i try to scrape all "a" tags it only returns 2 which are completly different things.

    Can somebody help me about it ? I really appreciate it.

    Continue reading...

Compartilhe esta Página