Mientras enero y Julho y nada de noticia del FreeBSD
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Menú Mostrar Mensajes#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o globo.com.so globo.com.cpp
// modificar em thunder.lst - http.*\.globo\.com.*(\.mp4|\.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("globo.com/") != string::npos) and (url.find(".flv") or (url.find(".mp3")) != string::npos)
;) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "globo";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}