MarketingPipeline / CBC-News-Streams.js

A JavaScript library to fetch free live TV stream URLs from CBC.ca / CBC News
MIT License
5 stars 1 forks source link
browser canada canadian cbc cbc-news free free-tv iptv javascript live-tv live-tv-streams m3u m3u-playlist m3u8 news-channels streaming streams

CBC-News-Streams.js

Repo Banner for CBC-News-Streams.js

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 :canada:

Example and usage

How to fetch all channels
```js // CBC-News-Streams.js Example - get all channels. import {CBC_News_Streams} from 'https://cdn.jsdelivr.net/gh/MarketingPipeline/CBC-News-Streams.js@v1.0.0/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
```js /// CBC-News-Streams.js Example - get single channel example. import {CBC_News_Streams} from 'https://cdn.jsdelivr.net/gh/MarketingPipeline/CBC-News-Streams.js@v1.0.0/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.

Contributing GitHub

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.

License GitHub

This project is licensed under the MIT License - see the LICENSE file for details.