

A fully automated ticket-grabbing bot designed specifically for the Tixcraft ticketing website, integrating Selenium and a custom-trained CNN model to automatically solve CAPTCHAs.
2024
Sole Developer
PyTorch, Selenium
Zephyr is a fully automated ticket-grabbing bot designed for the Tixcraft ticketing website. It integrates the Selenium automation tool with a custom-trained CNN model to automate the entire process, from selecting the event, area, and number of tickets to solving the CAPTCHA and proceeding to the checkout page.
The core design of this project focuses on high efficiency and stability. It maximizes the probability of successfully purchasing tickets through multithreading, random delays to simulate human behavior, and a sophisticated error-handling mechanism.
Google Drive Video
Zephyr in Action (Logged Out)
CAPTCHA authentication is the most critical challenge in the ticket-grabbing process, and often the most challenging and time-consuming phase for human users. To overcome this, I developed an efficient CNN model, with a training process divided into several stages:
Sources of Base Training Data:
Model Architecture: The core of the model is a Convolutional Neural Network. The architecture has been continuously optimized since the initial version. Later versions introduced deeper network layers, Batch Normalization to accelerate convergence, and Dropout layers to prevent overfitting, all of which improved the model's accuracy and generalization capabilities.
Later Stage Training Method (Fine-Tuning): To handle difficult cases encountered by the model in real-world scenarios, I designed a semi-automated improvement workflow:
Final Achieved Performance: After multiple rounds of training and optimization, the model achieved extremely high recognition accuracy and very fast prediction speeds. This ensures that the CAPTCHA-solving step does not become a bottleneck in the time-sensitive ticket-grabbing process.
Zephyr's automated workflow is meticulously designed to ensure stability and efficiency.
Configuration Method: The bot's behavior is driven by a JSON configuration file. Users can customize:
event_url: The URL of the event page.ticket_number: The number of tickets to purchase.desired_areas: A list of keywords for desired seating areas, arranged in order of priority.shift: A list corresponding to desired_areas. This parameter solves the problem of duplicate area names (for example, multiple "Area A" links). shift: [0] means clicking the first matching area, while shift: [1] means clicking the second, and so on.Features Added for Stability: Rather than purely pursuing speed, Zephyr prioritizes stability in a real-world environment. To achieve this, I incorporated several mechanisms to simulate human actions and handle unexpected situations:
random_sleep with a small, random delay between operations like clicking and typing to avoid being detected as a bot.@alert_handler is used to automatically manage various web alerts (like "Incorrect CAPTCHA" or "No contiguous seats available in this area") and determines the next action based on the alert's content (for example, re-entering the CAPTCHA or switching to another area).WebDriverWait to ensure elements are fully loaded before interaction and employs ActionChains to simulate mouse hovering and other actions. This handles dynamically loaded web content and effectively avoids common errors like ElementClickInterceptedException.
This project, "Zephyr," is intended for personal learning and technical research only. It aims to explore the integrated application of web automation, computer vision, and machine learning. The purpose of developing this project is purely for academic exploration and to enhance personal development skills.
Any successful results shown in the project (such as ticket screenshots) are part of functional testing and proof-of-concept, not for actual commercial or personal gain. All sensitive information in the displayed images has been blurred to align with the academic research purpose of this disclaimer.
All code and related resources are retained by the developer. Please refrain from asking for the source code or the final product. Any application of this project's concepts or techniques to actual ticket purchasing, or any action that violates the terms of use of the ticketing platform, is not associated with the developer.