ctrip-flight-search
Original:🇨🇳 Chinese
Translated
Ctrip Flight Query Skill based on browser automation tools, supporting one-way and round-trip flight queries, capable of handling parameter inputs such as departure location, destination, date, etc., and equipped with error recovery mechanisms. Suitable for scenarios where flight information, flight prices, and schedules need to be queried from Ctrip.
2installs
Added on
NPX Install
npx skill4agent add stvlynn/dingtalk-wukong-skills ctrip-flight-searchTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →Ctrip Flight Query Skill
Function Overview
This skill provides complete automated Ctrip flight query capabilities, based on verified browser operation workflows, supporting the following features:
- One-way flight query: Query flights from departure to destination on a specified date
- Round-trip flight query: Query flights with specified round-trip dates (verified support)
- Multi-city support: Supports input of Chinese city names and airport codes
- Multi-city universality: Verified to support any city combinations (e.g., Guangzhou→Chengdu, Beijing→Shanghai, etc.)
- International flight query: Supports international route queries (e.g., Shanghai→Tokyo, Beijing→Seoul, etc.)
- Date range: Supports date input in YYYY-MM-DD format
- Error handling: Equipped with handling mechanisms for exceptions such as invisible elements and page changes
Application Scenarios
When users need to:
- Query flight information for specific dates
- Obtain flight prices and schedules
- Automate flight query processes
- Extract flight data from Ctrip
- Verify the feasibility of flight queries between different cities
Core Operation SOP Workflow
Basic Query Process
- Navigate to Ctrip homepage: →
navigatehttps://www.ctrip.com - Enter flight query page: → Locate the flight ticket button →
backboneclick - Input departure location: → City name →
type→ Select specific airport →searchclick - Input destination: → Target city →
searchclick - Set date: Confirm that the date input box is correctly set
- Execute query: →
press(preferred solution) or click the search buttonEnter
Key Operation Points
Departure/Destination Input
- First use to enter the city name in the input box (e.g., "Beijing", "Shanghai", "Guangzhou", "Chengdu", etc.)
type - The system will automatically display a drop-down selection list
- Use to find specific airport options (e.g., "Beijing(Daxing International Airport)(PKX)", "Chengdu(Shuangliu International Airport)(CTU)", etc.)
search - Use to select the target airport
click - Multi-city universality: This skill has been verified to support any combination of Chinese city names, including first-tier, second-tier, and third-tier cities
Query Execution Strategy
- Preferred solution: Use +
pressto submit the form (avoids overlay blocking issues, verified effective in multi-city scenarios)Enter - Alternative solution: If the Enter key is invalid, use to find the search button and
searchitclick
Error Handling Mechanisms
- Invisible elements: Try using keyboard operations instead of mouse clicks (keyboard operations are more stable in multi-city tests)
- Page structure changes: Reuse or
backboneto obtain the latest element references after each interactionsearch - Input failure: Retry input or use alternative city name formats
- Dynamic element reference invalidation: This problem is common in multi-city tests, so it is recommended to re-locate elements before each operation
Supported Parameter Formats
Departure/Destination
- Chinese city names: "Beijing", "Shanghai", "Guangzhou", "Chengdu", "Shenzhen", "Hangzhou" etc. (supports major cities nationwide)
- International city names: "Tokyo", "Seoul", "Singapore", "Bangkok", "Paris", "London" etc. (supports major international cities)
- Airport codes: "PEK", "SHA", "CAN", "CTU", "HND", "ICN" etc. (three-letter codes)
- Full airport names: "Beijing Capital International Airport", "Shanghai Hongqiao International Airport", "Guangzhou Baiyun International Airport", "Chengdu Shuangliu International Airport", "Tokyo Haneda Airport", "Seoul Incheon International Airport" etc.
Date Format
- Standard format: YYYY-MM-DD (e.g., 2026-03-20)
- Supported range: Current date and future dates
Flight Type
- One-way: Supported by default
- Round-trip: Supports return date parameters (verified)
- Multi-segment: Complex query scenarios (to be expanded)
Verified Operation Scope
✅ Access Ctrip official website and navigate to flight query page
✅ Input departure city name and select specific airport
✅ Input destination city name and select specific airport
✅ Set query date
✅ Execute flight query and successfully jump to results page
✅ Handle page dynamic changes and element reference updates
✅ Multi-city universality verification: Successfully tested multiple city combinations such as Guangzhou(CAN)→Chengdu(CTU), Beijing(PEK)→Shanghai(SHA) ✅ Keyboard operation stability: Verified the reliability of the Enter key submission strategy in multi-city tests ✅ International flight query verification: Successfully tested the international route Shanghai(SHA)→Tokyo(HND), verifying the universality of international city recognition and query processes
✅ Input departure city name and select specific airport
✅ Input destination city name and select specific airport
✅ Set query date
✅ Execute flight query and successfully jump to results page
✅ Handle page dynamic changes and element reference updates
✅ Multi-city universality verification: Successfully tested multiple city combinations such as Guangzhou(CAN)→Chengdu(CTU), Beijing(PEK)→Shanghai(SHA) ✅ Keyboard operation stability: Verified the reliability of the Enter key submission strategy in multi-city tests ✅ International flight query verification: Successfully tested the international route Shanghai(SHA)→Tokyo(HND), verifying the universality of international city recognition and query processes
Reference Documents
Detailed operation guides and SOP workflows please refer to: references/操作指南.md
Notes
- Page loading time: Ctrip pages may require some loading time, appropriate waiting is needed between operations
- Network environment: Ensure stable network connection, Ctrip is accessible stably in China
- Browser compatibility: Based on modern browser automation tools, ensure tool version compatibility
- Captcha handling: If captcha or login requirements are encountered, manual intervention is required
- Multi-city test conclusion: The skill performs consistently across different city combinations, core operation workflow does not need adjustment
Expansion Directions
- Add support for round-trip flight queries
- Support cabin class selection (economy class, business class, first class)
- Add price filtering and sorting functions
- Support data extraction from flight detail pages
- Add batch query functions