Giter Club home page Giter Club logo

epg's Introduction

EPG

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

Then navigate to the downloaded epg folder:

cd epg

And install all the dependencies:

npm install

Usage

To start the download of the guide, select one of the supported 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 the guide.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 (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)

Access the guide by URL

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

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 -- --site=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 the guide automatically on a schedule, you need to pass a valid cron expression to the script using the --cron attribute:

npm run grab -- --site=example.com --cron="0 0 * * *"

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

Playlists

Playlists with already linked guides can be found in the iptv-org/iptv repository.

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

epg's People

Contributors

freearhey avatar iptv-bot[bot] avatar revgear avatar ministorm3 avatar popeyethesai10r avatar bellezaemporium avatar central302 avatar arkina1234 avatar derpymcdonuts avatar tohenk avatar mcastellaneta avatar smrtprjcts avatar sicilykill avatar tertogordez avatar nickleby avatar arifbudiman avatar f640 avatar smark223 avatar dexer125 avatar xemles avatar liimee avatar isilrhun avatar las-pen avatar mineplayerspe avatar thedeatcrusher avatar zoom-adr avatar azimabid00 avatar sebitr avatar allanf181 avatar michaelrpowell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.