Request information from CFE page to be displayed in a discord bot
To clone and run this application, you'll need Git and Yarn installed on your computer. From your command line:
# Clone this repository
$ git clone https://github.com/BeelanMX/scrapCFEBot
# Go into the repository
$ cd scrapCFEBot
# Install dependencies
$ yarn install
# Run the app
$ yarn start
To use the functions you only need to import the library, after that, create a instance of that. Remember, you must send a parameter, a text which is the word or sentence that the scrapper will use to search. Finally, you only need to execute the runScraping function and wait for the results. Something like:
const Scrapper = require('./webScraping/index');
const TEXT = 'example';
const myScrap = new Scrapper(TEXT);
myScrap.runScraping();
- Discord Bot Token Guide
- Discord.js v12.0.0
- Node.js v14.0.0 or newer
Follow the provided guide to create your own bot aplication from the page Discord Developer Portal.
After you cloned this repository and installed all the necessary dependecies, you'll need to create an .env
file in the root of repository using the structure shown in the env.sample of this repository.
You can use the prefix that you like the most.
(
#To run the bot
$ node index.js
The bot is controled by certain commands with the correspondent prefix (!). For more information read this file
This application is created using Node14
We are using the library Puppeteer v10.1.0 To run in linux or WSL2 need install chromium-browser
#!/bin/bash
$ sudo apt-get update
$ sudo apt-get install chromium-browser
$ sudo apt-get install -y libgbm-dev
if there is some issues there are some reference here, here
Name: Prettier
Name: Material Icon Theme
Name: Import Cost
Name: ESLint