用于增强12306同站换乘班次搜索的功能
- requests
- pandas
- tabulate
git clone https://github.com/jimrueaster/12306-smart-transfer.git
cd 12306-smart-transfer
git clone https://github.com/jimrueaster/JRUtils.git
# main.py
stations = {
'from_station': '广州南',
'transfer_station': '深圳北',
'to_station': '香港西九龙',
}
# from_station 出发站
# transfer_station 换乘站
# to_station 到达站
# from_time 最早出发时间
# no_more_than 整体行程耗时限制(分钟)
# to_time 最晚到达时间
smart_transfer(s_set_off_date=date, d_stations=stations, i_from_time=10, i_no_more_than=90,
i_to_time=12)
smart_transfer(s_set_off_date=date, d_stations=reverse_stations, i_from_time=20, i_no_more_than=90,
i_to_time=22)
Done!