Giter VIP home page Giter VIP logo

epguides's Introduction

EPGuides

EPGuides - Electronic Program Guide - is a useful and straightforward tv program data covering countries across the globe. It's free to use, updated every seven days, and provides simple array access to the downloaded XML structures.

EPG Data

Supports Belgium, France, Germany, and United Kingdom TV Channels at the moment:

  • Albania, Belgium, France, Germany and United Kingdom (combined epg, but it is large):

    • XML Format: https://www.iptvepg.eu/epg
  • Albania:

    • XML Format: https://www.iptvepg.eu/al
  • Belgium:

    • XML Format: https://www.iptvepg.eu/be
  • France:

    • XML Format: https://www.iptvepg.eu/fr
  • Germany:

    • XML Format: https://www.iptvepg.eu/de
  • United Kingdom:

    • XML Format: https://www.iptvepg.eu/uk

JSON Format

Need the EPG data in JSON format? You can parse the XML output asynchronously without the callback hell using xml2js. Don't forget to replace epg with the country code in the URL if you need it for a specific country.

var eyes = require('eyes'),
    http = require('http'),
    async = require('async'),
    xml2js = require('xml2js');

async.waterfall([
    function(callback) {
        http.get('https://www.iptvepg.eu/epg', function(res) {
            var response_data = '';
            res.setEncoding('utf8');
            res.on('data', function(chunk) {
                response_data += chunk;
            });
            res.on('end', function() {
                callback(null, response_data)
            });
            res.on('error', function(err) {
                callback(err);
            });
        });
    },
    function(xml, callback) {
        var parser = new xml2js.Parser();
        parser.parseString(xml, function(err, result) {
            if (err) {
                callback(err);
            } else {
                callback(null, result);
            }
        });
    },
    function(json, callback) {
        // do something useful with the json
        eyes.inspect(json);
        callback();
    }
], function(err, result) {
    if (err) {
        console.log('Got error');
        console.log(err);
    } else {
        console.log('Done.');
    }
});

Need a guide for your country, got issues or questions?

๐Ÿ˜Ž ๐Ÿ‘‹ Email Me

epguides's People

Contributors

0xnu 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.