This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Copyright (c) 2015-2016 CoNWeT Lab., Universidad Politécnica de Madrid | |
# This file is part of CKAN Data Requests Extension. | |
# CKAN Data Requests Extension is free software: you can redistribute it and/or | |
# modify it under the terms of the GNU Affero General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require("http"); | |
var fs = require("fs"); | |
var url = require("url") | |
http.createServer(function(clientRequest, clientResponse) { | |
var requestBody = ""; | |
clientRequest.on("data", function(new_data) { | |
requestBody += new_data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#EXTINF:-1,Nickelodeon | |
http://B29273.cdn.telefonica.com/29273/NICK_SUB.m3u8 | |
#EXTINF:-1,Disney Junior | |
http://B29285.cdn.telefonica.com/29285/DSNJR_SUB.m3u8 | |
#EXTINF:-1,40TV | |
http://B31312.cdn.telefonica.com/31312/40TV_SUB.m3u8 | |
#EXTINF:-1,Disney XD | |
http://B31309.cdn.telefonica.com/31309/DSNYXD_SUB.m3u8 | |
#EXTINF:-1,Canal Cocina | |
http://B31305.cdn.telefonica.com/31305/COCINA_SUB.m3u8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
# Basic Variables | |
MIN_RANGE = 22000 | |
MAX_RANGE = 40000 | |
BASE_URL = 'http://B%d.cdn.telefonica.com/%d/%s_SUB.m3u8' | |
CHANNELS_IDS = ['NICK', 'DSNJR', '40TV', 'DSNYXD', 'COCINA', '24HORAS', 'INVITADO', 'FOX', | |
'AXN', 'CLL13', 'TNT', 'FOXCRIME', 'CSMO', 'AXNWHITE', 'PCMDY', 'SYFY', 'TCM', | |
'CPLUSLG', 'MOVFUTBOL', 'CPLUSCHP', 'NTLG', 'NATGEOWILD', 'CPLUS1'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cleverPush="\ | |
local arguments=ARGV\n\ | |
local max_mem=tonumber(table.remove(arguments))\n\ | |
local queue=KEYS[1]\n\ | |
local s=redis.call('info','memory')\n\ | |
local mem=tonumber(string.match(s,'used_memory:(.-)\\r\\n'))\n\ | |
if mem<(max_mem) then\n\ | |
return redis.call('lpush', queue, unpack(arguments))\n\ | |
else\n\ | |
return {err='Max queue size reached: infomem: '..tostring(mem)..' max_mem: '..tostring(max_mem)}\n\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<script src="/socket.io/socket.io.js"> | |
</script> | |
<script> | |
var iosocket; | |
function connect_first() { |