Aug-14-2021, 11:49 AM
I have written the code below to scrape the data from the bet monitor.
When i run the code, i will get 18x the text: 'Today 13 Aug 20:00' . I would like to get the result with all the different dates in stead of just the same text 18 times. So the result i want:
" Today 13 Aug 20:00
Saturday 14 Aug 16:30
etc''
Can somebody help me to get all the dates instead of the same date many times?
Thanks!
When i run the code, i will get 18x the text: 'Today 13 Aug 20:00' . I would like to get the result with all the different dates in stead of just the same text 18 times. So the result i want:
" Today 13 Aug 20:00
Saturday 14 Aug 16:30
etc''
Can somebody help me to get all the dates instead of the same date many times?
Thanks!
from selenium import webdriver url = 'https://www.betmonitor.com/odds-comparison/football/netherlands-eredivisie/10000060' driver = webdriver.Chrome() driver.get(url) header = driver.find_element_by_id('content') event = header.find_elements_by_class_name('league-event-new') for details in event: datum = details.find_element_by_xpath('//div[@class="evtime"]').text print(datum)