I want to get this page's timetable but my code the end print is [].
How can I get the time table use Beautiful soup?
This is my page https://www.thsrc.com.tw/ArticleContent/a3b630bb-1066-4352-a1ef-58c7b4e8ef7c
The end print also show[]
What tags or class should I use?
from selenium import webdriver
from selenium.webdriver.support.ui import Select
import pandas as pd
import time
import requests as req
from bs4 import BeautifulSoup
url="https://www.thsrc.com.tw/ArticleContent/a3b630bb-1066-4352-a1ef-58c7b4e8ef7c"
driver=webdriver.Chrome()
driver.get(url)
ag=driver.find_element_by_class_name("swal2-confirm.swal2-styled")
ag.click()
#start
def start():
print("請輸入起始站")
start=Select(driver.find_element_by_id("select_location01"))
all_option=start.select_by_visible_text(input(""))
start()
#terminal
def stand():
print("terminal")
stand=Select(driver.find_element_by_id("select_location02"))
all_option2=stand.select_by_visible_text(input(""))
stand()
#search
sr=driver.find_element_by_id("start-search")
sr.click()
soup = BeautifulSoup(driver.page_source, "lxml")
dan=[]
data=soup.find_all("div","timeTableTrain_S")
dan.append(data)
print(dan)
time.sleep(5)
driver.quit()