ランキングに戻る

iptv-org/epg

HTMLiptv-org.github.io

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

epgtviptvguidexml
スター成長
スター
3.2k
フォーク
482
週間成長
Issue
24
1k2k3k
2021年3月2022年12月2024年10月2026年7月
README

EPG update

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

Table of contents

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:

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:

cd epg

And install all the dependencies:

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:

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:

Usage: npm run grab --- [options]

Options:
  -s, --sites <names>           A comma-separated list of the sites to parse
  -c, --channels <path>         Path to *.channels.xml file (required if the "--sites" attribute is
                                not specified)
  -o, --output <path>           Path to output file (default: "guide.xml")
  -l, --lang <codes>            Allows you to restrict downloading to channels in specified languages only (example: "en,id")
  -t, --timeout <milliseconds>  Timeout for each request in milliseconds (default: 30000)
  -d, --delay <milliseconds>    Delay between request in milliseconds (default: 0)
  -x, --proxy <url>             Use the specified proxy (example: "socks5://username:password@127.0.0.1:1234")
  --days <days>                 Number of days for which the program will be loaded (defaults to the value from the site config)
  --maxConnections <number>     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:

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:

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 number of simultaneous requests using the --maxConnections attribute:

npm run grab --- --sites=example.com --maxConnections=10

But be aware that under heavy load some sites may start return an error or completely block your access.

Use custom channel list

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>
  <channel site="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

Run on schedule

If you want to download guides on a schedule, you can use cron or any other task scheduler. Currently, we use a tool called chronos for this purpose.

To start it, you only need to specify the necessary grab command and cron expression:

npx chronos --execute="npm run grab --- --sites=example.com" --pattern="0 0,12 * * *" --log

For more info go to chronos documentation.

Access the guide by URL

You can make the guide available via URL by running your own server. The easiest way to do this is to run this command:

npx 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

For more info go to serve documentation.

Update

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

Docker

Pull an image

docker pull ghcr.io/iptv-org/epg:master

Create and run container

docker run -p 3000:3000 -v /path/to/channels.xml:/epg/public/channels.xml ghcr.io/iptv-org/epg:master

By default, the guide will be downloaded every day at 00:00 UTC and saved to the /epg/public/guide.xml file inside the container.

From the outside, it will be available at this link:

http://localhost:3000/guide.xml

or

http://<your_local_ip_address>:3000/guide.xml

Environment Variables

To fine-tune the execution, you can pass environment variables to the container as follows:

docker run \
-p 5000:3000 \
-v /path/to/channels.xml:/epg/public/channels.xml \
-e CRON_SCHEDULE="0 0,12 * * *" \
-e MAX_CONNECTIONS=10 \
-e GZIP=true \
-e JSON=true \
-e CURL=true \
-e PROXY="socks5://127.0.0.1:1234" \
-e DAYS=14 \
-e TIMEOUT=5 \
-e DELAY=2 \
-e RUN_AT_STARTUP=true \
ghcr.io/iptv-org/epg:master
Variable Description
CRON_SCHEDULE A cron expression describing the schedule of the guide loadings (default: "0 0 * * *")
MAX_CONNECTIONS Limit on the number of concurrent requests (default: 1)
GZIP Boolean value indicating whether to create a compressed version of the guide (default: false)
JSON Boolean value indicating whether to create a JSON version of the guide (default: false)
CURL Display each request as CURL (default: false)
PROXY Use the specified proxy
DAYS Number of days for which the guide will be loaded (defaults to the value from the site config)
TIMEOUT Timeout for each request in milliseconds (default: 30000)
DELAY Delay between request in milliseconds (default: 0)
RUN_AT_STARTUP Run grab on container startup (default: true)

Guides

Any user can share the guides they have created with the rest of the community. A complete list of these guides and their current status can be found in the GUIDES.md file.

Database

All channel data is taken from the iptv-org/database repository. If you find any errors please open a new issue there.

API

The API documentation can be found in the iptv-org/api repository.

Resources

Links to other useful IPTV-related resources can be found in the iptv-org/awesome-iptv repository.

Discussions

If you have a question or an idea, you can post it in the Discussions tab.

Contribution

Please make sure to read the Contributing Guide before sending issue or a pull request.

And thank you to everyone who has already contributed!

Backers

Contributors

License

CC0

関連リポジトリ
fanmingming/live

✯ 可直连访问的电视/广播图标库与相关工具项目 ✯ 🔕 永久免费 直连访问 完整开源 不断完善的台标 支持IPv4/IPv6双栈访问 🔕

JavaScriptnpmGNU General Public License v3.0radioiptv
live.fanmingming.com
28.3k4.2k
Guovin/iptv-api

⚡️IPTV直播源自动更新工具:自动采集、校验、测速并生成可播放结果,支持 M3U/TXT/API 输出、自定义频道、IPv4/IPv6、Docker、GitHub Actions、CLI 与 GUI 多端部署

PythonPyPIOtheriptvtvbox
24.7k7.2k
iptv-org/awesome-iptv

A curated list of resources related to IPTV

tviptv
12k1.3k
4gray/iptvnator

:tv: Cross-platform IPTV player application with multiple features, such as support of m3u and m3u8 playlists, favorites, TV guide, TV archive/catchup and more.

TypeScriptnpmMIT Licenseiptvpwa
4gray.github.io/iptvnator/
6.7k861
tvheadend/tvheadend

Tvheadend is the leading TV streaming server for Linux with ATSC, DVB-C/C2, DVB-S/S2, DVB-T/T2, IPTV, SAT>IP and unix pipe input sources

CGNU General Public License v3.0atscdvb
tvheadend.org
3.5k970
qwerttvv/Beijing-IPTV

最好用的北京联通、北京移动IPTV频道列表。https://bjiptv.gq/

GoGo ModulesCreative Commons Zero v1.0 Universaliptvbeijing
bjiptv.gq
2.3k351
kimwang1978/collect-txt

源 (自动整理)

HTMLtvboxlive
iptv365.org
1.9k431
karolkozer/planby

TypeScriptnpmOtherepgschedule
planby.app
1.7k116
kimwang1978/collect-tv-txt

TV直播源 (每日自动收集・持续更新)

PythonPyPItvboxlive
live.iptv365.org/live.txt
1.4k328
oxyroid/M3UAndroid

a clean, practical, ad-free IPTV app

KotlinGNU General Public License v3.0androidkotlin
t.me/m3u_android
1.2k148
taksssss/iptv-tool

IPTV工具箱, Docker🐳部署,支持EPG管理、直播源管理、台标管理,兼容DIYP/百川、超级直播及xmltv格式。

PHPPackagistGNU General Public License v2.0diypepg
hub.docker.com/r/taksss/php-epg/
1.1k287
tsduck/tsduck

MPEG Transport Stream Toolkit

C++BSD 2-Clause "Simplified" Licensempegdvb
tsduck.io
1.1k238