This project provides a simple Cloudflare Worker script for redirecting users to live streams on YouTube based on different types of identifiers such as channel names, custom handles, or video IDs. It's designed for educational purposes only and should not be used in production environments.
Method to get YouTube channel live URL with Workers Script.
Important
The Link only works if the YT channel is Live.
If you're new to CF Workers, visit and get started here: workers.cloudflare.com
Follow the steps:
-
Your Cloudflare dashboard.
dash.cloudflare.com
-
Workers & Pages
>Overview
. -
Create application
. -
Create Worker
. -
Ignore the workers custom name, you can change it later.
-
Click on
Deploy
. -
Configure Worker
<>Edit code
Choose one.
- If
Configure Worker
, continue to follow step number. - If
Edit code
, skip step (8) and go to Get Script Code.
Quick edit
.
You can test the Workers script here Workers Playground
Don't forget to rename your workers > yourCustomName.yourName.workers.dev
, it's up to you to make it an attractive custom name.
To rename your workers:
Your workers > Manage application
> Rename service
> Choose your new service name > Continue
.
After deploying the new workers script, activate the workers by appending a .m3u8 link to the end of the URL.
/channel/
https://workers.name.workers.dev/channel/channel-id.m3u8
/c/
https://workers.name.workers.dev/c/custom-name.m3u8
/user/
https://workers.name.workers.dev/user/user-name.m3u8
/live/
https://workers.name.workers.dev/live/video-id.m3u8
/@
https://workers.name.workers.dev/@handle-name.m3u8
YouTube Channel ID Finder
Note
CF Workers: Request limit is 100,000 per day. If the limit is exceeded, the request returns an error.