Answer the question
In order to leave comments, you need to log in
Why are the letters of the text received by Selenium displayed in a column?
#Import libraries
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
#Include chromedriver
chromedriver = '/Users/User/Desktop/parser/chromedriver'
driver = webdriver.Chrome(chromedriver)
driver.implicitly_wait(20) # seconds
driver.get(' https://1x-bet28462.com/en/results/ ' )
team = driver.find_element_by_xpath("//div[@class='c-games__item']").text
for i in team:
print(i)
driver.quit()
Answer the question
In order to leave comments, you need to log in
So you are looking for only one element
find_element_by_xpath("//div[@class='c-games__item']").text
teams = driver.find_elements_by_xpath("//div[@class='c-games__item']")
for i in teams:
print(i.text)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question