mirror of
https://github.com/ION606/selmerBot.git
synced 2026-05-14 21:26:54 +00:00
Finished fixing the web-scraper for Heroku
This commit is contained in:
+6
-4
@@ -1,17 +1,19 @@
|
||||
const hastebin = require("hastebin-gen");
|
||||
|
||||
module.exports ={
|
||||
name: "scraper",
|
||||
description: ".....",
|
||||
execute(message, args) {
|
||||
async execute(message, args) {
|
||||
const axios = require('axios');
|
||||
const cheerio = require('cheerio')
|
||||
const url = args[0];
|
||||
axios(url)
|
||||
.then(response => {
|
||||
.then(async response => {
|
||||
const html = response.data;
|
||||
const $ = cheerio.load(html);
|
||||
//lyrics = $('.para_row').text();
|
||||
|
||||
message.channel.send(html);
|
||||
const haste = await hastebin(html, { extension: "txt" });
|
||||
message.channel.send(haste);
|
||||
// console.log(lyrics);
|
||||
})
|
||||
.catch(console.error);
|
||||
|
||||
Generated
+17
@@ -17,6 +17,7 @@
|
||||
"discord.js": "^13.6.0",
|
||||
"ffmpeg": "^0.0.4",
|
||||
"ffmpeg-static": "^5.0.0",
|
||||
"hastebin-gen": "^2.0.5",
|
||||
"libsodium-wrappers": "^0.7.10",
|
||||
"node.js": "^0.0.1-security",
|
||||
"play-dl": "^1.9.4",
|
||||
@@ -924,6 +925,14 @@
|
||||
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
||||
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
|
||||
},
|
||||
"node_modules/hastebin-gen": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/hastebin-gen/-/hastebin-gen-2.0.5.tgz",
|
||||
"integrity": "sha512-At1LaKtcqh2jiP8xfE2sDGT9IshIki6FqsgLwn2y7FzAvlFJRtpUsSPh3yWjWIQIvxi/GPF07IBqSI8WhPL/gQ==",
|
||||
"dependencies": {
|
||||
"node-fetch": "^2.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/htmlparser2": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz",
|
||||
@@ -2925,6 +2934,14 @@
|
||||
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
||||
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
|
||||
},
|
||||
"hastebin-gen": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/hastebin-gen/-/hastebin-gen-2.0.5.tgz",
|
||||
"integrity": "sha512-At1LaKtcqh2jiP8xfE2sDGT9IshIki6FqsgLwn2y7FzAvlFJRtpUsSPh3yWjWIQIvxi/GPF07IBqSI8WhPL/gQ==",
|
||||
"requires": {
|
||||
"node-fetch": "^2.6.0"
|
||||
}
|
||||
},
|
||||
"htmlparser2": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"discord.js": "^13.6.0",
|
||||
"ffmpeg": "^0.0.4",
|
||||
"ffmpeg-static": "^5.0.0",
|
||||
"hastebin-gen": "^2.0.5",
|
||||
"libsodium-wrappers": "^0.7.10",
|
||||
"node.js": "^0.0.1-security",
|
||||
"play-dl": "^1.9.4",
|
||||
|
||||
Reference in New Issue
Block a user