How weceng/ticket-purchase works
This repository is a Damai ticket-purchase automation tool with separate Selenium web and Appium Android workflows. Users configure an event and attendee details, then run a client that searches or opens the event, selects ticket options and attendees, and may submit the order. Web automation also handles login and environment setup; mobile automation drives the installed app through an Appium server. The web flow is concentrated in Concert, while the mobile flow has original and optimized implementations. Some internal stages are documented but not fully shown in the excerpts.
Main entry points: concert.py Web ticket flow · damai_app_v2.py Optimized app bot · damai_app.py Original app flow · damai.py Web launcher
Components 15
Web automation
- Web launcher
damai/damai.py - Web ticket flow
damai/concert.py - Login and cookies
damai/concert.py - Event and ticket selection
damai/concert.py - Attendee selection
damai/concert.py - Order submission
damai/concert.py
Mobile automation
- Optimized app bot
damai_appium/damai_app_v2.py - Original app flow
damai_appium/damai_app.py
Configuration and setup
- Web settings
damai/config.py - ChromeDriver checks
damai/check_environment.py - Mobile settings
damai_appium/config.py
Other components
- Operator
- Chrome and WebDriver
- Appium server
- Damai Android app
Connections 20
- Operator → Web settings: configures
README.md - Operator → Mobile settings: configures
README.md - Operator → Web launcher: starts
README.md - Web launcher → Web settings: loads
damai/damai.py - Web launcher → Web ticket flow: creates and runs
damai/damai.py - Web ticket flow → ChromeDriver checks: checks driver
damai/concert.py - Web ticket flow → Chrome and WebDriver: drives browser
- Web ticket flow → Login and cookies: handles login
damai/concert.py - Web ticket flow → Event and ticket selection: selects event and tickets
README.md - Web ticket flow → Attendee selection: selects attendees
damai/concert.py - Web ticket flow → Order submission: may submit order
README.md - Operator → Optimized app bot: starts
README.md - Optimized app bot → Mobile settings: loads
damai_appium/damai_app_v2.py - Optimized app bot → Appium server: connects to
README.md - Appium server → Damai Android app: drives
README.md - Optimized app bot → Damai Android app: searches and selects tickets
damai_appium/damai_app_v2.py - Optimized app bot → Damai Android app: selects attendees and submits
damai_appium/damai_app_v2.py - Original app flow → Mobile settings: loads
damai_appium/damai_app.py - Original app flow → Appium server: connects to
README.md - Original app flow → Damai Android app: searches and books
damai_appium/damai_app.py