Estos plugins se encuentran en estado de prueba, pero por alguna razon te genera algun error, por favor avisar, para poder carregirlos.
Canal A&E
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o canalaetv.com.so canalaetv.com.cpp
// regex
// http.*\.canalaetv\.com.*(\.mp4|\.png|\.jpg|\.swf)
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find(".canalaetv.com") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "canalaetv";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Canal Sony
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o canalsony.com.so canalsony.com.cpp
// regex
// http.*\.canalsony\.com.*(\.mp4|\.png|\.jpg|\.swf)
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find(".canalsony.com") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "canalsony";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Universal Channel
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o universalchannel.com.so universalchannel.com.cpp
// regex
// http.*\.universalchannel\.com.*(\.mp4|\.png|\.jpg|\.swf)
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find(".universalchannel.com") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "universalchannel";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Saludos
Canal Discovery Ingles
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o dyscovery.com.so dyscovery.com.cpp
// regex
// http.*\.dyscovery\.com.*(\.mp4|\.png|\.jpg|\.swf)
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find(".dyscovery.com") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "Dyscovery";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Canal Discovery Familia
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o dyscoveryfamilia.com.so dyscoveryfamilia.com.cpp
// regex
// http.*\.dyscoveryfamilia\.com.*(\.mp4|\.png|\.jpg|\.swf)
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find(".dyscoveryfamilia.com") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "dyscoveryfamilia";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Discovery Kids Imagenes
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o ddmcdn.com.so ddmcdn.com.cpp
// regex
// http.*\.ddmcdn\.com.*(\.mp4|\.png|\.jpg|\.swf)
string dominiotxt="ddmcdn";
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find("/kids/") != string::npos)
) {
dominiotxt="Discovery_Kids_Img";
}
if ( (url.find(".ddmcdn.com") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = dominiotxt;
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Discovery en Español
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o cloudinary.com.so cloudinary.com.cpp
// regex
// http.*\.cloudinary\.com.*(\.mp4|\.png|\.jpg|\.swf)
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find(".cloudinary.com") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "Discovery_es";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Saludos
Videos de CNN
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o level3.net.so level3.net.cpp
// regex
// http.*\.level3\.net.*(\.mp4|\.png|\.jpg|\.swf)
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find(".level3.net") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "level3_videos";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Una pequeña modificacion al plugin de turner, para poder hacer cache por dominio de CNN es español
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// g++ -I. -fPIC -shared -g -o turner.com.so turner.com.cpp
// regex
// http.*\.turner\.com.*(\.jpg|\.png|\.flv|\.swf|\.mp3)
string dominiotxt="turner";
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find("/CARTOON/") != string::npos)
) {
dominiotxt="turner_cartoon";
}
if ( (url.find("/toon/") != string::npos)
) {
dominiotxt="turner_cartoon2";
}
if ( (url.find("/toonla/") != string::npos)
) {
dominiotxt="turner_cartoonla";
}
if ( (url.find("/cnnnext/") != string::npos)
) {
dominiotxt="Cnn_Español_Img";
}
if ( (url.find(".turner.com/") != string::npos) and
((url.find(".jpg")!= string::npos) or
(url.find(".png") != string::npos) or
(url.find(".mp3") != string::npos) or
(url.find(".swf") != string::npos))
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = dominiotxt;
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Saludos
Tu Discovery Kids
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o tudiscoverykids.com.so tudiscoverykids.com.cpp
// regex
// http.*\.tudiscoverykids\.com.*(\.mp4|\.png|\.jpg|\.swf)
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find(".tudiscoverykids.com") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "tudiscoverykids";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Canal National Geographic en Español
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o nationalgeographic.es.so nationalgeographic.es.cpp
// regex
// http.*\.nationalgeographic\.es.*(\.mp4|\.png|\.jpg|\.swf)
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find(".nationalgeographic.es") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "nationalgeographic";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Canal National Geographic en Ingles
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o natgeotv.com.so natgeotv.com.cpp
// regex
// http.*\.natgeotv\.com.*(\.mp4|\.png|\.jpg|\.swf)
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find(".natgeotv.com") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "Natgeo";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Canal Nickelodeon en Español
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o nickelodeon.es.so nickelodeon.es.cpp
// regex
// http.*\.nickelodeon\.es.*(\.mp4|\.png|\.jpg|\.swf)
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find(".nickelodeon.es") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "nickelodeon_es";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Saludos
Sugerencias de plugin de canales de TV, a mi esos se me ocurrieron, ya que son los usados en mi red, Saludos