I'm trying to parse the list of selenium python without results. What I want is to remove the 0-0 results of soccer matches. Example code:
driver.get("https://www.flashscore.com/match/Qs85KCdA/#h2h/overall")
time.sleep(3)
rows = driver.find_elements_by_xpath("//div[@class='h2h__row']")
for row in rows:
results = row.find_element_by_xpath(".//span[@class='h2h__regularTimeResult']")
date = row.find_element_by_xpath(".//span[@class='h2h__date']")
print(results.text)
print(date.text)
Output:
0 : 0
10.12.21
1 : 2
04.12.21
0 : 2
01.12.21
0 : 0
27.11.21
3 : 1
22.11.21
0 : 0
10.12.21
1 : 2
05.12.21
0 : 5
30.11.21
1 : 2
27.11.21
1 : 1
20.11.21
0 : 0
10.12.21
5 : 1
30.06.20
2 : 2
15.12.19
1 : 0
15.04.13
1 : 1
18.11.12
What i want is to don't print the 0:0. So if there is 0:0 result in the overall matche summary i don't print it. I've tried everything but nothing worked. Could someone help me?