The problem is, as much as I try, I cannot click on a day for example 27th of April, do you know another way to make it? Thank you as always! something weird goes on in this page hahaha
Code:
def select_dates_main_page(sb, scraped_day, get_next_month):
two_times = 0
while two_times != 2:
list_datatime_elements = None
list_datatime_elements = sb.find_elements('div.lightpick__days > div')
for index, item in enumerate(list_datatime_elements):
date_attribute = item.get_attribute("data-time")
if date_attribute:
date_attribute = convert_datetime(int(date_attribute))
if scraped_day.strftime('%Y-%m-%d') in date_attribute:
log.info(date_attribute)
list_datatime_elements[index+1].click()
sb.sleep(1)
break
two_times += 1
sb.click('[class="lightpick__apply-action-sub"]', timeout=12)
Hello!
https://www.renfe.com/es/es
The problem is, as much as I try, I cannot click on a day for example 27th of April, do you know another way to make it? Thank you as always! something weird goes on in this page hahaha
Code: