How lovefirst02/tix_bot works
Project type and purpose
• This is an open-source Python automation tool (“MaxBot”) for automatically purchasing tickets from multiple ticketing platforms (tixcraft, kktix, cityline, urbtix, ibon, etc.).
• It uses Selenium WebDriver (ChromeDriver or GeckoDriver) to drive a browser, plus optional non-browser fallback scraping logic (NonBrowser.py), and notifies the user via sound effects.
File structure
• Top-level scripts:
• settings.py: GUI for editing user preferences (keywords, URLs, drivers).
• chrome_tixcraft.py: Core bot engine that launches ChromeDriver, navigates pages, matches keywords and prices.
• NonBrowser.py: Alternative “headless” or HTTP-based scraping module.
• Configuration:
• settings.json: Persists user settings from the GUI.
• pip-reg.txt: Lists Python dependencies (e.g., selenium).
• Resources:
• ding.wav, ding-dong.wav: Notification sounds for captcha or ticket-found.
• maxbot_logo2_single.ppm: Logo displayed in the GUI.
• Support files:
• LICENSE, README.md: Documentation and license.
README for additional insights
• Describes supported platforms, setup steps, how to download drivers, and manual captcha input.
• Emphasizes use of Selenium, Python3, and external driver binaries (ChromeDriver/GeckoDriver).
a. Main components
1. User Interface (settings.py + GUI)
2. Configuration Store (settings.json)
3. Bot Engine
– Browser Mode (chrome_tixcraft.py + selenium)
– Non-Browser Mode (NonBrowser.py)
4. WebDriver Binary (chromedriver or geckodriver in /webdriver)
5. External Ticketing Services (tixcraft, kktix, etc.)
6. Notification Subsystem (ding.wav, ding-dong.wav)
b. Relationships and interactions
– User launches settings.py → edits preferences → writes settings.json.
– User launches bot (chrome_tixcraft.py or NonBrowser.py) → reads settings.json.
– Bot Engine initializes Selenium WebDriver (pointing to chromedriver path).
– Bot Engine drives browser to External Ticketing Services, performs login/search, applies keyword and price filters.
– On events (captcha prompt, success), Bot Engine triggers Notification Subsystem to play sounds.
c. Architectural patterns / design principles
– Separation of concerns (GUI vs. core engine vs. notifications).
– Pluggable backends (Browser vs. Non-Browser).
– Configuration-driven behavior (all parameters in JSON).
d. Key technologies / libraries
– Python 3
– Selenium WebDriver
– tkinter or PySimpleGUI (for settings.py GUI)
– JSON for config persistence