i've a problem tryng to scrapeing data from live matches
import requests from bs4 import BeautifulSoup url = "https://oddspedia.com/football" headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36'} response = requests.get(url, headers=headers) if response.status_code == 200: soup = BeautifulSoup(response.text, 'html.parser') # Trova tutti gli elementi div con la classe "match-status--inplay", "match-timer", o "match-score--inplay" matches = soup.find_all('div', class_=lambda value: value and ('match-status--inplay' in value or 'match-timer' in value or 'match-score--inplay' in value)) for match in matches: # Trova l'elemento padre "a" contenente i dati desiderati match_info = match.find_parent('a') # Estrai i dati desiderati dalla struttura HTML match_url = match_info['href'] teams = match_info.find_all('div', class_='match-team__name') team1 = teams[0].text.strip() team2 = teams[1].text.strip() # Estrai le immagini team_images = match_info.find_all('img', class_='logo-team') team1_image = team_images[0]['src'] team2_image = team_images[1]['src'] # Verifica se รจ presente il timer match_status = match.find('div', class_='match-status') match_timer = match.find('div', class_='match-timer') match_score = match.find('div', class_='match-score--inplay') status_text = match_status.text.strip() if match_status else "N/A" timer_text = match_timer.text.strip() if match_timer else "N/A" score_home = match_score.find('div', class_='match-score__team--home').text.strip() if match_score else "N/A" score_away = match_score.find('div', class_='match-score__team--away').text.strip() if match_score else "N/A" # Stampai dati print(f"URL: {match_url}") print(f"Team 1: {team1}") print(f"Team 1 Image: {team1_image}") print(f"Team 2: {team2}") print(f"Team 2 Image: {team2_image}") print(f"Status: {status_text}") print(f"Timer: {timer_text}") print(f"Score Home: {score_home}") print(f"Score Away: {score_away}") print("----") else: print(f"Errore nella richiesta. Codice di stato: {response.status_code}") print(response.text)no errors but no values