$ show mi0e/BiliBiliDropsMiner
This repository is a Bilibili automation tool designed to automatically claim live stream rewards (drops) and complete watching time tasks. It features a dual-mode interface with both a PySide6-based GUI and a CLI entry point. The core functionality involves browser automation via Selenium to extract necessary credentials (cookies) and task information from Bilibili's web interface, followed by API interactions using signed requests (WBI) to claim rewards and report watch time via x25Kn heartbeat protocols. The application includes a notification system supporting multiple services (Gotify, Serverι ±, WeCom, Apprise) and persists configuration via JSON files and Qt settings. The architecture is modular, separating concerns into distinct modules for API client logic, worker management, GUI components, and utilities.
The LLM identified 3 files worth highlighting for reuse:
Implements a thread-safe logging handler that redirects Python logging records to a Qt text widget via signals and slots, enabling real-time log display in GUI applications without blocking the main thread. Demonstrates proper Qt threading practices and can be reused in any PyQt/PySide application requiring GUI-integrated logging.
Manages the lifecycle of worker threads with methods for starting, stopping, and waiting for threads to finish, including timeout handling and forced termination. Provides a clean abstraction for background task management in GUI applications, encapsulating thread state and ensuring clean shutdown. Reusable in any multithreaded GUI application needing controlled worker execution.
Provides a unified interface for sending notifications via multiple services (Gotify, Serverι ±, WeCom, Apprise) with configurable fallbacks. Encapsulates the complexity of integrating with diverse notification APIs, allowing easy addition of new services. Demonstrates the adapter pattern and strategy pattern for notification dispatching, reusable in any project requiring multi-channel notifications.