You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plugin works fine when the url is entered from another accessible page hits http, url But when he is sent to a page that is not actually there first enters:
But when I want to re-scrape the page if it exists, it is as if the previous error has affected this new client (or former client has not been deleted) and this causes the following error
TypeError: Object #<EventEmitter> has no method 'title'
at EventEmitter.<anonymous> (/root/nodejs/proyect/WebScraping.js:15:37)
I was noticing as trying to erase all traces of the client created on each request, but nothing worked for me.
The code in my js file on the server is as follows:
var MetaInspector = require('node-metainspector');
function EscanearWeb(socket, datos_entrada) {
var client = new MetaInspector(datos_entrada.url, {});
client.once("fetch", function() {
var datos_salida = {};
datos_salida.title = client.title();
datos_salida.description = client.description();
datos_salida.image = client.image();
socket.emit("datosWebScraping", datos_salida);
});
client.once("error", function(err) {
console.log("## ERR ##", err);
socket.emit("datosWebScraping", err);
//delete client;
});
client.fetch();
}
I need that every request will create a new client and can be removed without a trace.
I hope you can help me
Greetings
The text was updated successfully, but these errors were encountered:
Sorry i've been slow responsing to these issues. @MiroRadenovic feel free to submit a PR with the fix. @WiII feel free to submit a PR with a failing test and I will make sure the issue is fixed and the test passes.
Good day
I am having a problem
The plugin works fine when the url is entered from another accessible page hits http, url But when he is sent to a page that is not actually there first enters:
and returning the data:
But when I want to re-scrape the page if it exists, it is as if the previous error has affected this new client (or former client has not been deleted) and this causes the following error
I was noticing as trying to erase all traces of the client created on each request, but nothing worked for me.
The code in my js file on the server is as follows:
I need that every request will create a new client and can be removed without a trace.
I hope you can help me
Greetings
The text was updated successfully, but these errors were encountered: