$ show ssili126/tv
This repository is an automated IPTV channel source scraper and validator, primarily targeting Chinese hotel and groupcast (็ปๆญ) streams. The system uses Selenium with headless Chrome to scrape search engines like FOFA and ZoomEye for IPTV-related URLs, then brute-force scans IP ranges to discover accessible streaming servers. It downloads sample TS segments from discovered m3u8 streams to measure download speed and optionally validate resolution using OpenCV. The output is a curated playlist in both CSV and M3U formats (itvlist.txt, itvlist.m3u) organized into categories like ๅคฎ่ง้ข้, ๅซ่ง้ข้, and ๅ ถไป้ข้. The project includes multiple execution scripts (itv.py, new.py, itv_all.py, ZHGXTV.py) and a GitHub Actions workflow for daily automated runs. While functional, the codebase suffers from hardcoded IP lists, fragile error handling, tight coupling, and reliance on external services that may change. It is a pragmatic tool rather than a polished application.
The LLM identified 3 files worth highlighting for reuse:
Asynchronous version of the main scraper using asyncio and aiohttp for concurrent HTTP requests. Demonstrates a pattern for high-throughput URL discovery and validation without blocking I/O, making it more scalable than the threaded version. Reusable template for async scraping projects.
Multithreaded speed testing module that uses a Queue to distribute channel URLs across worker threads, downloads TS segments, and measures throughput in MB/s. This pattern is extractable for any streaming or download speed validation task.
Main scraping script combining Selenium-driven search with IP range brute-force scanning. It implements a reusable pattern for discovering unprotected IPTV endpoints by iterating through network octets and testing accessibility. Although fragile to site changes, the logic for building and testing candidate URLs is self-contained.