A JavaScript library for fetching free live IPTV stream URLs from CBC News
Show your support!
A pure JavaScript library for easily fetching free live stream urls (m3u format) for live TV channels from CBC.ca
Note: CBC content is geo-restricted to Canada 🇨🇦
How to fetch all channels
// CBC-News-Streams.js Example - get all channels.
import {CBC_News_Streams} from 'https://cdn.jsdelivr.net/gh/MarketingPipeline/[email protected]/dist/cbc-news-streams.min.js'
try {
console.log(await CBC_News_Streams().getAllChannels()) // returns a JSON array of objects.
} catch (error) {
console.log(error.message)
}
This will return an array of all channel details & stream URLs.
How to fetch single channel
/// CBC-News-Streams.js Example - get single channel example.
import {CBC_News_Streams} from 'https://cdn.jsdelivr.net/gh/MarketingPipeline/[email protected]/dist/cbc-news-streams.min.js'
try {
console.log(await CBC_News_Streams().getChannel("Toronto")) // returns a JSON object.
} catch (error) {
console.log(error.message)
}
This will return a single JSON object with channel details + the stream URL.
Want to improve this project? Create a pull request with detailed changes / improvements! If approved you will be added to the list of contributors of this awesome project!
See also the list of contributors who participate in this project.
This project is licensed under the MIT License - see the LICENSE file for details.