- Notifications
You must be signed in to change notification settings - Fork261
Utilities for downloading the EPG (Electronic Program Guide) for thousands of TV channels from hundreds of sources.
License
iptv-org/epg
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Tools for downloading the EPG (Electronic Program Guide) for thousands of TV channels from hundreds of sources.
First, you need to installNode.js on your computer. You will also need to installGit to follow these instructions.
After that open theConsole (orTerminal if you have macOS) and type the following command:
git clone --depth 1 -b master https://github.com/iptv-org/epg.git
Then navigate to the downloadedepg
folder:
cd epg
And install all the dependencies:
npm install
To start the download of the guide, select one of thesupported sites and paste its name into the command below:
npm run grab --- --site=example.com
And once the download is complete, the guide will be saved to theguide.xml
file.
Usage: npm run grab --- [options]Options: -s, --site<name> Name of the site to parse -c, --channels<path> Path to*.channels.xml file (requiredif the"--site" attribute is not specified) -o, --output<path> Path to output file (default:"guide.xml") -l, --lang<code> Filter channels by language (ISO 639-2 code) -t, --timeout<milliseconds> Override the default timeoutfor each request -d, --delay<milliseconds> Override the default delay between request -x, --proxy<url> Use the specified proxy (example:"socks5://username:password@127.0.0.1:1234") --days<days> Override the number of daysfor which the program will be loaded (defaults to the value from the site config) --maxConnections<number> Limit on the number of concurrent requests (default: 1) --cron<expression> Schedule a script run (example:"0 0 * * *") --gzip Create a compressed version of the guide as well (default: false)
You can make the guide available via URL by running your own server:
npm run serve
After that, the guide will be available at the link:
http://localhost:3000/guide.xml
In addition it will be available to other devices on the same local network at the address:
http://<your_local_ip_address>:3000/guide.xml
By default, the guide for each channel is downloaded one by one, but you can change this behavior by increasing the number of simultaneous requests using the--maxConnections
attribute:
npm run grab --- --site=example.com --maxConnections=10
But be aware that under heavy load, some sites may start return an error or completely block your access.
Create an XML file and copy the descriptions of all the channels you need from the/sites into it:
<?xml version="1.0" encoding="UTF-8"?><channels> <channelsite="arirang.com"lang="en"xmltv_id="ArirangTV.kr"site_id="CH_K">Arirang TV</channel> ...</channels>
And then specify the path to that file via the--channels
attribute:
npm run grab --- --channels=path/to/custom.channels.xml
If you want to download the guide automatically on a schedule, you need to pass a validcron expression to the script using the--cron
attribute:
npm run grab --- --site=example.com --cron="0 0 * * *"
If you have downloaded the repository code according to the instructions above, then to update it will be enough to run the command:
git pull
And then update all the dependencies:
npm install
Playlists with already linked guides can be found in theiptv-org/iptv repository.
All channel data is taken from theiptv-org/database repository. If you find any errors please open a newissue there.
The API documentation can be found in theiptv-org/api repository.
Links to other useful IPTV-related resources can be found in theiptv-org/awesome-iptv repository.
If you have a question or an idea, you can post it in theDiscussions tab.
Please make sure to read theContributing Guide before sendingissue or apull request.
And thank you to everyone who has already contributed!
About
Utilities for downloading the EPG (Electronic Program Guide) for thousands of TV channels from hundreds of sources.