Parsing HTML data on a website with Javascript

  cheerio, discord.js, javascript

I have a Discord bot using Discord.js and I am trying to make it gather information from a specific webpage. As of right now the code I have is this;

                if(args[1] === 'player'){
                    msg.channel.send(`https://realmeye.com/player/${args[2]}`)
                }
                if(args[1] === 'guild'){
                    msg.channel.send(`https://realmeye.com/guild/${args[2]}`)
                }
            break;

Which shows just the link of the page, which is helpful but it doesn’t display info at a glance, which is what I’m trying to make this bot do. I asked in a Discord server and was told to use Cheerio to help parse information from the page but I don’t quite understand how to use it.

Source: Ask Javascript Questions

LEAVE A COMMENT