[Python] How can I reduce result using find_all?

Discussão em 'Python' iniciado por Stack, Abril 22, 2025.

  1. Stack

    Stack Membro Participativo

    I tried to get Manchester Utd's win result from Latest 10 Scores of Premier League. So I wrote below code But It did not show Manchester Utd's win result But all the Latest 10 Scores result.It was impossible for me to filter win result using find_all.

    from bs4 import BeautifulSoup
    from selenium import webdriver
    driver=webdriver.Chrome()
    driver.implicitly_wait(3)
    driver.get("https://www.livesport.com/en/team/manchester-united/ppjDR086/")
    page=driver.page_source
    bs_obj=BeautifulSoup(page,"html.parser")
    win=bs_obj.find_all("span",{"class":"wcl-simpleText_Asp-0 wcl-scores-simpleText-01_pV2Wk"})
    win


    How can I reduce result(filter) win result using find_all in this code?

    Continue reading...

Compartilhe esta Página