El plugins wikipedia esta dando errores conlas imagenes alguien sabe como corregirlo?
La prueba la pueden hacer buscando por ejemplo maná en google entranen el resultado de la busqueda en wikipedia abran la primera imagen y luego la intentan cargar de nuevo da un error y no abre.
Probe y todo bien, google chrome e IE
abe esta pagina http://es.wikipedia.org/wiki/Man%C3%A1_%28banda%29 abre cualquiera de sus imagenes dale atras y intenta abrirla nuevamente da error
Prueba con este código
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o wikimedia.org.so wikimedia.org.cpp
// Regex
// http.*\.wikimedia\.org.*(\.jpg|\.png)
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()-2) + "_" + resultado.at(resultado.size()-1);
} else {
SearchReplace(url,"File:","-");
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-2) + "_" + resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( ((url.find(".wikimedia.org/wikipedia/commons/") != string::npos) )
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "wikipedia_img";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
ahora si funciona bien amigo joemg :)
Cita de: joemg6 en Mayo 27, 2013, 10:07:52 AM
Prueba con este código
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o wikimedia.org.so wikimedia.org.cpp
// Regex
// http.*\.wikimedia\.org.*(\.jpg|\.png)
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()-2) + "_" + resultado.at(resultado.size()-1);
} else {
SearchReplace(url,"File:","-");
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-2) + "_" + resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( ((url.find(".wikimedia.org/wikipedia/commons/") != string::npos) )
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "wikipedia_img";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Provando y funcionando al 100%, gracias Joemg6, Saludos
Hola fire,
Pregunta, después de actualizar el plugin, debo borrar el cache ya almacenado..?
Cordialmente
Cita de: abcwarbot en Julio 10, 2013, 11:51:59 AM
Hola fire,
Pregunta, después de actualizar el plugin, debo borrar el cache ya almacenado..?
Cordialmente
Si hay que borrar el cache almacenado pero solo el de wikipedia_img los demas no, preferentemente antes de actualizar, Saludos
Cita de: joemg6 en Mayo 27, 2013, 10:07:52 AM
Prueba con este código
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o wikimedia.org.so wikimedia.org.cpp
// Regex
// http.*\.wikimedia\.org.*(\.jpg|\.png)
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()-2) + "_" + resultado.at(resultado.size()-1);
} else {
SearchReplace(url,"File:","-");
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-2) + "_" + resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( ((url.find(".wikimedia.org/wikipedia/commons/") != string::npos) )
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "wikipedia_img";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Amigo Joemg6 segun he visto este plugin no se pasado a las nuevas actualizaciones, Saludos