How neworin/tvbox works
Project type and purpose
• This is an open‑source “resource repository” for the Android TVBox application. It does not contain full application code, but instead hosts JSON and JAR‑based scraper definitions (“crawlers”), live EPG sources, extension scripts, and VOD metadata. Clients (Android app, Web editor) dynamically load these resources to aggregate video sources without any built‑in backend.
File structure
• Top level:
• README.md, m.json, dm.txt, dc.txt — bootstrap manifests and documentation
• sub/ — primary module folder
• vod/ — offline VOD metadata folder
• xiaopingguo.json — single “small Apple” manifest
• sub/:
• MeowXB/, MeowXP/ — two large sets of JSON crawler definitions, each with hundreds of files
• ext/ — additional JSON/TXT definitions for sports, music, token lists, etc.
• jar/ — Java .jar crawler packages used by the Android app at runtime
• live/ — live EPG playlist text files and metadata
• dr/ — one or more JavaScript-based extension scripts (e.g., 豆瓣.js)
• vod/:
• A hierarchy by numeric IDs (501, 601, 701…) containing JSON/TXT metadata and a README.md.
README for additional insights
• Confirms the repo powers TVBox OSC (Android), Web JSON editor, and supplies unlimited scraper sources (no ads).
• Supports multiple JAR‑based crawlers, EPG XML sources for live TV guides.
Components
a. Main components
1. Client Apps
• Android TVBoxOSC App
• CatVodTVJsonEditor (Web/PC)
2. CDN / Git Raw Hosting
• raw.liucn.cc, jsdelivr, ghproxy, etc.
3. Resource Repository
• m.json (master manifest)
• dm.txt, dc.txt (alternative manifests)
• sub/ (MeowXB, MeowXP, ext, jar, live, dr)
• vod/ (offline metadata sets)
4. External Target Sites
• Various third‑party video websites (defined by JSON/JAR modules)
5. EPG Services
• epg.51zmt.top, epg.112114.xyz
6. Runtime Environment
• Android WebView / JavaScript engine / Java runtime for JARs
b. Relationships & interactions
• Client → HTTP GET m.json from CDN
→ parse manifest → discover module URLs
→ fetch JSON modules (sub/MeowXB, ext/, vod/) & JARs
→ load scraper definitions into runtime
→ at user request, scraper logic issues HTTP calls to External Target Sites
→ parse HTML/JSON → return video listings/streams
• Client → fetch live EPG XML from EPG Services
• Editor App → HTTP GET manifests & JSON → present in GUI for editing
c. Architectural patterns & design principles
• Plugin/Module‑based architecture: JSON + JAR modules define crawling logic, loaded at runtime
• Content Delivery via CDN: static files hosted on Git/raw hosts for global access
• Schema‑driven parsing: JSON files define selectors, endpoints, parse rules
• Separation of concerns:
• Manifest (m.json) drives module discovery
• sub/ modules hold discrete sets of sources
• vod/ offline VOD served by metadata files
d. Key technologies & frameworks
• HTTP/HTTPS for content delivery
• JSON schema for scraper definitions
• Java/.jar packages for advanced crawling in Android
• JavaScript for small extensions (dr/豆瓣.js)
• CDN accelerators (jsdelivr, rawfast, ghproxy, GitCDN)
Elements
• Clear labels:
• “Client Apps” (Android, Editor)
• “CDN / Git Raw Hosts”
• “Resource Repository” (m.json, sub/, vod/)
• “External Video Sites”
• “EPG Services”
1. App → CDN (manifests, modules)
2. App → External Sites → App (scraped data)
3. App → EPG Service → App
• Orange clouds for external dependencies (Video Sites, EPG Services)
• Clients in purple