Hola aqui les dejo varios plugins de diarios y revistas de la Republica Argentina, en los encabezados estan los comentarios de los mismos, espero les sirvan
Código [Seleccionar]
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// clarin.com - incluye los videos de clarin.com, ole.com.ar y entremujeres.com
// Oogie Boogie - diciembre 31, 2013
// use this line to compile
// g++ -I. -fPIC -shared -g -o clarin.com.so clarin.com.cpp
// regex
// http.*\.clarin\.com.*(\.png|\.jpg|\.gif|\.swf|\.mp3|\.mp4|\.flv)
string dominiotxt="clarin.com -img-";
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()-3)+"_"+resultado.at(resultado.size()-2)+"_"+resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-3)+"_"+resultado.at(resultado.size()-2)+"_"+resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find("ole.clarin.com/") != string::npos)
) {
dominiotxt="ole.com.ar -videos-";
}
if ( (url.find("contenidos1.clarin.com/") != string::npos)
) {
dominiotxt="clarin.com -videos-";
}
if ( (url.find("entremujeres.clarin.com/") != string::npos)
) {
dominiotxt="entremujeres.clarin.com";
}
if ( (url.find(".clarin.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;
}
Código [Seleccionar]
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// Ole.com -Diario Deportivo- (los videos salen de ole.clarin.com)
// Oogie boogie - diciembre 31, 2013
// use this line to compile
// g++ -I. -fPIC -shared -g -o ole.com.ar.so ole.com.ar.cpp
// regex
// http.*\.ole\.com\.ar.*(\.png|\.jpg|\.gif|\.swf|\.flv)
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("ole.com.ar/") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "ole.com.ar -img-";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Código [Seleccionar]
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// Diario La Nacion
// Oogie Boogie - septiembre 15, 2013
// use this line to compile
// g++ -I. -fPIC -shared -g -o lanacion.com.ar.so lanacion.com.ar.cpp
// regex
// http.*\.lanacion\.com\.ar.*(\.png|\.jpg|\.gif|\.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(".lanacion.com.ar/") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "lanacion.com.ar -img-";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Código [Seleccionar]
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// Servidor de imagenes del diario lanacion.com
// Oogie Boogie - septiembre 15, 2013
// use this line to compile
// g++ -I. -fPIC -shared -g -o clanacion.com.ar.so clanacion.com.ar.cpp
// regex
// http.*\.clanacion\.com\.ar.*(\.png|\.jpg|\.gif|\.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(".clanacion.com.ar/") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "lanacion.com.ar -img-";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Código [Seleccionar]
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// diario pagina 12
// Oogie Boogie - noviembre 11, 2013
// use this line to compile
// g++ -I. -fPIC -shared -g -o pagina12.com.ar.so pagina12.com.ar.cpp
// regex
// http.*\.pagina12\.com\.ar.*(\.png|\.jpg|\.gif|\.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(".pagina12.com.ar/") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "pagina12.com.ar";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}/code]
[code]#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// Servidor de imagenes de editorial perfil.com
// Oogie Boogie - enero 18, 2014
// use this line to compile
// g++ -I. -fPIC -shared -g -o perfil.com.so perfil.com.cpp
// regex
// http.*\.perfil\.com.*(\.png|\.jpg|\.gif|\.swf)
string dominiotxt="perfil.com -img-";
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("noticias.perfil.com/") != string::npos)
) {
dominiotxt="noticias.perfil.com";
}
if ( (url.find("caras.perfil.com/") != string::npos)
) {
dominiotxt="caras.perfil.com";
}
if ( (url.find(".perfil.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;
}
Código [Seleccionar]
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// Servidor de imagenes de la revista noticias.com
// Oogie Boogie - enero 18, 2014
// use this line to compile
// g++ -I. -fPIC -shared -g -o noticias.com.so noticias.com.cpp
// regex
// http.*\.noticias\.com.*(\.png|\.jpg|\.gif|\.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(".noticias.com/") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "noticias.com -img-";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}