I carefully searched for a solution on many sites here, but none of them work!
I am trying to clear flashscores.com and I want to parse <td>with a class name cell_ab team-homeorcell_ab team-home bold
I tried to use re
soup.find_all('td', { 'class'= re.compile(r"^(cell_ab team-home |cell_ab team-home bold )$"))
and
soup.find_all('td', { 'class' : ['cell_ab team-home ','cell_ab team-home bold '])
none of them work.
someone requested codes, so here
from tkinter import *
from selenium import webdriver
import threading
from bs4 import BeautifulSoup
browser = webdriver.Firefox()
browser.get('http://www.flashscore.com/')
HTML = browser.page_source
soap = BeautifulSoup(HTML)
for item in soap.find_all('td', class_ = ['cell_ab team-home ','cell_ab team-home bold ']):
Listbox.insert(END,item.text)
source
share