Answer the question
In order to leave comments, you need to log in
Why is the Request module in Node.JS static?
Good day everyone, I'm interested in the question of the request module. When you run the script on NodeJS, everything works correctly, it takes the necessary information and displays it correctly, but the fact is that the information that I request on the site is constantly updated, and the script itself uses the version that was taken during the script launch, and so, How can I make this request dynamic so that the output information is received at the time of the request and not at the time the script is run.
request('url', function(err, resp, body) {
const $ = cheerio.load(body);
var t = $('option').contents().map(function() {
return (this.type === 'text') ? $(this).text() : '';
}).get().join('\
message.channel.send(t)
Answer the question
In order to leave comments, you need to log in
use the version that was taken at the time the script was run
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question