Install
openclaw skills install @andrew-707/ctrip-flight-sunriseSearch and compare flight tickets on Ctrip by departure, arrival, date, and cabin class, returning structured flight and price information in JSON format.
openclaw skills install @andrew-707/ctrip-flight-sunrise用于从携程网站搜索机票信息,获取地点、时间、价格、航班等结构化数据,支持比价分析、直飞/中转识别等功能。
# 基本搜索
python3 scripts/ctrip_flight.py -d 北京 -a 上海 -t 2026-04-01
# 输出JSON文件
python3 scripts/ctrip_flight.py -d 北京 -a 上海 -t 2026-04-01 -o result.json
# 多日期比价
python3 scripts/ctrip_flight.py -d 北京 -a 上海 -t 2026-04-01 --compare 2026-04-01,2026-04-02,2026-04-03
| 参数 | 说明 | 示例 |
|---|---|---|
| -d, --departure | 出发城市 | 北京 |
| -a, --arrival | 到达城市 | 上海 |
| -t, --date | 出发日期 (YYYY-MM-DD) | 2026-04-01 |
| -c, --cabin | 舱位类型 (y/c/f) | y (经济舱) |
| -o, --output | 输出JSON文件路径 | result.json |
| --compare | 多日期对比,逗号分隔 | 2026-04-01,2026-04-02 |
{
"searchParams": {
"departure": "BJS",
"departureName": "北京",
"arrival": "SHA",
"arrivalName": "上海",
"date": "2026-04-01",
"cabin": "y"
},
"flights": [
{
"flightNo": "HO1254",
"airline": "吉祥航空",
"airlineCode": "HO",
"depTime": "2026-04-01 21:25:00",
"arrTime": "2026-04-01 23:35:00",
"duration": 130,
"depAirport": "大兴",
"depAirportCode": "PKX",
"arrAirport": "浦东",
"arrAirportCode": "PVG",
"planeType": "空客320",
"stops": 0,
"isDirect": true,
"price": 450
}
],
"statistics": {
"totalFlights": 11,
"directFlights": 11,
"transitFlights": 0,
"lowestPrice": 450,
"highestPrice": 550,
"avgPrice": 516
},
"searchTime": "2026-03-27T18:07:42"
}
当前使用预设的 FVP cookie。如需更新:
self.cookie 变量支持中国主要城市: 北京(BJS), 上海(SHA), 广州(CAN), 深圳(SZX), 成都(CTU), 杭州(HGH), 南京(NKG), 武汉(WUH), 西安(XIY), 重庆(CKG), 厦门(XMN), 长沙(CSX), 昆明(KMG), 大连(DLC), 青岛(TAO), 天津(TSN), 郑州(CGO), 福州(FOC), 沈阳(SHE), 哈尔滨(HRB) 等
skills/ctrip-flight/
├── skill.md # 本文档
├── README.md # 使用说明
└── scripts/
├── ctrip_flight.py # 主搜索脚本
└── ctrip_search.py # 备用搜索脚本