Ticket-purchase is a Python automation tool for purchasing tickets on Damai, a Chinese ticketing platform, supporting both web and mobile interfaces.
The tool addresses the challenge of securing tickets during high-demand sales periods by automating the ticket selection and purchase workflow. It uses Selenium for web-based ticket purchasing and Appium for mobile automation on Android devices. The automation handles the repetitive steps of searching for events, selecting specific performance details like city and date, choosing price tiers, and adding designated attendees to orders. It includes retry logic and optimized clicking strategies designed for the rapid interactions required in competitive ticketing scenarios.
Developers should choose this tool if they need to automate ticket purchases on Damai specifically and have the infrastructure to support either web automation with Chrome or mobile automation with an Android device and Appium. The mobile approach is recommended in the documentation. The project requires Python 3.9 or later, Node.js, and either a modern Chrome browser with ChromeDriver for web-based purchasing or a configured Android environment with Appium for mobile purchasing. Configuration is handled through JSON files where users specify search keywords, attendee names, performance city and date, ticket price preferences, and whether to automatically submit orders. The tool suits projects where ticket acquisition needs to be automated for specific events with known parameters.
The project shows active maintenance with troubleshooting documentation addressing common setup issues including Node.js version compatibility, Android environment configuration, device connectivity, and Appium server connection problems. The codebase includes debugging guidance for verifying device status and Appium connectivity. Documentation covers the complete workflow from environment preparation through execution and result monitoring, with detailed configuration parameter explanations and system requirement specifications for different operating systems.