Monday, 5 June 2017

Node Request: Get certain class/id

I am using the Node module Request. I have also used node-fetch in the past but request seems better. I want to be able to log something with a certain ID/Class/Span, you name it. This is my current code which logs the whole body.

const request = require('request');

request("https://discord.js.org/#/docs/main/stable/class/GuildMember", (err, response, body) => {
    if (err) console.log(err);

    console.log(body)
});

I want to log the contents of any Property the user gives, let's say they give bannable I want to log the contents of div#doc-for-bannable.class-prop.class-item but I'm not sure how to do this.



via Rusty

No comments:

Post a Comment