iptv-org /epg

Utilities for downloading the EPG (Electronic Program Guide) for thousands of TV channels from hundreds of sources.

★ 3,472⑂ 546👁 89⑃ 1,891● 1,197▤ 0
HTMLCreated 2021-03-14iptv-org.github.io/
TA的项目
3,472
stars
+0+7+107
546
forks
89
watchers
1,891
prs
1,197
issues
0
releases
–
discussions

README

EPG 

Tools for downloading the EPG (Electronic Program Guide) for thousands of TV channels from hundreds of sources.

 Table of contents

- ✨ Installation
- 🚀 Usage
- 💫 Update
- 🐋 Docker
- 📅 Guides
- 🗄 Database
- 👨‍💻 API
- 📚 Resources
- 💬 Discussions
- 🛠 Contribution
- 📄 License

 Installation

First, you need to install Node.js on your computer. You will also need to install Git to follow these instructions.

After that open the Console (or Terminal) if you have macOS) and type the following command:

sh
git clone --depth 1 -b master https://github.com/iptv-org/epg.git


This will copy all the code from the repository to your computer into the epg folder. After that, we just need to go to the folder we created:

sh
cd epg


And install all the dependencies:

sh
npm install


 Usage

To start the download of the guide, select one of the supported sites from SITES.md file and paste its name into the command below:

sh
npm run grab --- --sites=example.com


Then run it and wait for the guide to finish downloading. When finished, a new guide.xml file will appear in the current directory.

You can also customize the behavior of the script using this options:

sh
Usage: npm run grab --- [options]

Options:
  -s, --sites            A comma-separated list of the sites to parse
  -c, --channels          Path to .channels.xml file (required if the "--sites" attribute is
                                not specified)
  -o, --output            Path to output file (default: "guide.xml")
  -l, --lang             Allows you to restrict downloading to channels in specified languages only (example: "en,id")
  -t, --timeout   Timeout for each request in milliseconds (default: 30000)
  -d, --delay     Delay between request in milliseconds (default: 0)
  -x, --proxy              Use the specified proxy (example: "socks5://username:[email protected]:1234")
  --days                  Number of days for which the program will be loaded (defaults to the value from the site config)
  --maxConnections      Number of concurrent requests (default: 1)
  --gzip [path]                 Specifies whether or not to create a compressed version of the guide (default: false)
  --json [path]                 Specifies whether or not to create a JSON version of the guide (default: false)
  --curl                        Display each request as CURL (default: false)


 Downloading from multiple sites at once

To do this, simply list the site names separated by commas:

sh
npm run grab --- --sites=example1.com,example2.com


To avoid mixing guides from different sites into a single output file, we can also automatically split the output into separate files based on the site name:

sh
npm run grab --- --sites=example1.com,example2.com --output=guides/{site}.xml


 Parallel downloading

By default, the guide for each channel is downloaded one by one, but you can change this behavior by increasing the nu

Snapshot: 2026-11-04T14:00:00Z · Data license Apache-2.0 · JSON