A Cloudflare Workers script that dynamically generates M3U8 playlists using NetTV Nepal's WebTV API. It focuses on Free-To-Air (FTA) Nepalese channels and selected international channels, offering a secure, flexible streaming experience across devices and platforms.
Designed for personal use, this project enables easy integration with popular media players while offering a clean, responsive login interface and multiple secure authentication options.
This tool is a lightweight, personal-use supplement to the official NetTV/WebTV platforms. It is:
- Fully hosted on Cloudflare Workers (no backend server required)
- Optimized for mobile and desktop use with a responsive login UI
- Compatible with Ncell OTP login, cookies, and JSON tokens
- Perfect for those who want portable, cross-device streaming with control over authentication and session management
-
🔐 Authentication Methods
- 📱 Ncell OTP Login: Login using your Ncell number and a one-time password
- 🍪 Session Cookie Login: Paste your existing cookie for direct access
- 🧾 JSON Token Login: Use a saved login token JSON
-
🖥️ Responsive Login Page
- Mobile-friendly, clean UI built for ease of use
- Works across phones, tablets, and desktops
-
📺 Dynamic M3U8 Playlist Generator
- Real-time generation of updated channel playlists
- Compatible with players like VLC, Kodi, and IPTV apps
-
🗂️ Organized Channel Categories
- Automatically groups channels into genres
-
⚡ Serverless Performance
- Hosted on Cloudflare’s global infrastructure
-
🔒 Cloudflare KV Token Storage
- Tokens stored securely in the KV Namespace
- No exposure of sensitive login credentials
-
🔁 Automatic Token Refresh
- Maintain continuous access with scheduled background refreshes
-
📡 WMS Signature Fetching
- Supports stream authorization via WMS Auth
Method | Path | Description |
---|---|---|
GET | /login |
Responsive login page for Ncell, Cookie, Token |
GET | /playlist |
Generates the dynamic M3U8 playlist (auth required) |
GET | /api |
Returns structured JSON metadata (channel/category) |
GET | /refresh |
Refreshes the session token |
GET | /wms |
Retrieves WMS authentication signature |
Copy workers.js
into your Cloudflare Worker project.
- Go to your Cloudflare Dashboard
- Navigate to Workers & Pages → KV
- Create a namespace:
geniusTVtoken
- Bind it to your Worker using the same name
Use Cloudflare’s UI or Wrangler CLI to deploy your worker.
-
Open
/login
to authenticate with Ncell, Cookie, or JSON Token -
After login:
- Access
/playlist
for your M3U8 stream - Use
/api
for metadata - Trigger
/refresh
to manually refresh the token if needed
- Access
Your live playlist will be available at:
https://<your-worker-subdomain>.workers.dev/playlist
#EXTM3U x-tvg-url="https://epgs.sunilprasad.com.np/webtv.xml.gz"
# FOSS Project Of Sunil Prasad @ sunilprasad.com.np
# STRICT WARNING: This is a private server.
# No one is authorized to use this except owner him/herself.
# Do not share, misuse, or attempt to access these tokens or credentials.
# Providers can open issue on github for any discussions.
# Unauthorized access or takedown attempts will face legal consequences.
#EXTINF:-1 tvg-id="channel1" tvg-chno="1" tvg-name="example-channel" tvg-country="np" tvg-logo="https://webtv-xyz.geniusxxx.com.np/channel/xx/logo" group-title="News", Example Channel
#KODIPROP:inputstream=inputstream.adaptive
#KODIPROP:inputstream.adaptive.manifest_type=hls
#EXTVLCOPT:http-user-agent=Mozilla/5.0
https://webtv-xyz.geniusxxx.com.np/stream.m3u8?wmsAuthSign=lkasmflkasmfmflamskfmaslfsafangjnrhne==
...
To automatically refresh tokens daily:
-
Go to cron-job.org
-
Create a new job:
- URL:
https://<your-worker-subdomain>.workers.dev/refresh
- Schedule: Once every 24 hours
- Title: WebTV Token Refresh
- Set your preferred time
- URL:
This keeps your session live with no manual actions.
- ✅ Responsive UI: Works well on any device
- ✅ Multi-login Support: Ncell, Cookies, or Token JSON
- ✅ Portable Access: Compatible with your favorite media players
- ✅ Fully Serverless: No backend to maintain
- ✅ Secure: Tokens stored in Cloudflare KV
- ✅ Always Updated: Real-time playlist and channel metadata
- Do not share your tokens or playlist URLs.
- All credentials are stored securely and are encrypted via KV.
- Misuse or public exposure will result in access termination.
This tool is intended strictly for:
-
Personal and educational purposes
-
Not affiliated with:
- NetTV Nepal
- GeniusSystem
- NewITVenture
- WorldLink
All users are solely responsible for ensuring that they comply with applicable copyright laws and streaming regulations. The author assumes no liability for misuse or unauthorized access.
This project is under a Custom License: No commercial use permitted. See LICENSE for details.
Sunil Prasad Regmi