数百のソースから数千のテレビチャンネル向けのEPG(電子プログラムガイド)をダウンロードするためのツール。
まず、コンピューターにnode.jsをインストールする必要があります。また、これらの命令に従うにはGITをインストールする必要があります。
その後、コンソール(またはMACOSがある場合は端末)を開き、次のコマンドを入力します。
git clone --depth 1 -b master https://github.com/iptv-org/epg.git次に、ダウンロードしたepgフォルダーに移動します。
cd epgすべての依存関係をインストールします。
npm installガイドのダウンロードを開始するには、サポートされているサイトのいずれかを選択し、その名前を以下のコマンドに貼り付けます。
npm run grab -- --site=example.comダウンロードが完了すると、ガイドはguide.xmlファイルに保存されます。
Usage: npm run grab -- [options]
Options:
-s, --site < name > Name of the site to parse
-c, --channels < path > Path to * .channels.xml file (required if 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 timeout for each request
-d, --delay < milliseconds > Override the default delay between request
--days < days > Override the number of days for 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)独自のサーバーを実行して、URL経由でガイドを利用可能にすることができます。
npm run serveその後、ガイドはリンクで利用可能になります。
http://localhost:3000/guide.xml
さらに、アドレスの同じローカルネットワーク上の他のデバイスが利用できます。
http://<your_local_ip_address>:3000/guide.xml
デフォルトでは、各チャネルのガイドは1つずつダウンロードされますが、 --maxConnections属性を使用して同時リクエストの数を増やすことでこの動作を変更できます。
npm run grab -- --site=example.com --maxConnections=10ただし、重い負荷の下では、一部のサイトがエラーを返し始めるか、アクセスを完全にブロックする可能性があることに注意してください。
XMLファイルを作成し、 /サイトから必要なすべてのチャネルの説明をコピーします。
<? 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 >次に、 --channels属性を介してそのファイルへのパスを指定します。
npm run grab -- --channels=path/to/custom.channels.xmlスケジュールで自動的にガイドをダウンロードする場合は、 --cron属性を使用して、有効なCron式をスクリプトに渡す必要があります。
npm run grab -- --site=example.com --cron= " 0 0 * * * " 上記の手順に従ってリポジトリコードをダウンロードした場合、更新するにはコマンドを実行するのに十分です。
git pullそして、すべての依存関係を更新します。
npm installすでにリンクされているガイドを備えたプレイリストは、IPTV-ORG/IPTVリポジトリにあります。
すべてのチャネルデータは、IPTV-ORG/データベースリポジトリから取得されます。エラーが見つかった場合は、そこで新しい問題を開いてください。
APIドキュメントは、IPTV-ORG/APIリポジトリにあります。
他の有用なIPTV関連のリソースへのリンクは、IPTV-ORG/Awesome-IPTVリポジトリにあります。
質問やアイデアがある場合は、ディスカッションタブに投稿できます。
発行またはプルリクエストを送信する前に、必ず貢献ガイドを読んでください。
そして、すでに貢献してくれたすべての人に感謝します!