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 ={
|
module.exports ={
|
||||||
name: "scraper",
|
name: "scraper",
|
||||||
description: ".....",
|
description: ".....",
|
||||||
execute(message, args) {
|
async execute(message, args) {
|
||||||
const axios = require('axios');
|
const axios = require('axios');
|
||||||
const cheerio = require('cheerio')
|
const cheerio = require('cheerio')
|
||||||
const url = args[0];
|
const url = args[0];
|
||||||
axios(url)
|
axios(url)
|
||||||
.then(response => {
|
.then(async response => {
|
||||||
const html = response.data;
|
const html = response.data;
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
//lyrics = $('.para_row').text();
|
//lyrics = $('.para_row').text();
|
||||||
|
const haste = await hastebin(html, { extension: "txt" });
|
||||||
message.channel.send(html);
|
message.channel.send(haste);
|
||||||
// console.log(lyrics);
|
// console.log(lyrics);
|
||||||
})
|
})
|
||||||
.catch(console.error);
|
.catch(console.error);
|
||||||
|
|||||||
Generated
+17
@@ -17,6 +17,7 @@
|
|||||||
"discord.js": "^13.6.0",
|
"discord.js": "^13.6.0",
|
||||||
"ffmpeg": "^0.0.4",
|
"ffmpeg": "^0.0.4",
|
||||||
"ffmpeg-static": "^5.0.0",
|
"ffmpeg-static": "^5.0.0",
|
||||||
|
"hastebin-gen": "^2.0.5",
|
||||||
"libsodium-wrappers": "^0.7.10",
|
"libsodium-wrappers": "^0.7.10",
|
||||||
"node.js": "^0.0.1-security",
|
"node.js": "^0.0.1-security",
|
||||||
"play-dl": "^1.9.4",
|
"play-dl": "^1.9.4",
|
||||||
@@ -924,6 +925,14 @@
|
|||||||
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
||||||
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
|
"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": {
|
"node_modules/htmlparser2": {
|
||||||
"version": "6.1.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz",
|
"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",
|
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
||||||
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
|
"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": {
|
"htmlparser2": {
|
||||||
"version": "6.1.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz",
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"discord.js": "^13.6.0",
|
"discord.js": "^13.6.0",
|
||||||
"ffmpeg": "^0.0.4",
|
"ffmpeg": "^0.0.4",
|
||||||
"ffmpeg-static": "^5.0.0",
|
"ffmpeg-static": "^5.0.0",
|
||||||
|
"hastebin-gen": "^2.0.5",
|
||||||
"libsodium-wrappers": "^0.7.10",
|
"libsodium-wrappers": "^0.7.10",
|
||||||
"node.js": "^0.0.1-security",
|
"node.js": "^0.0.1-security",
|
||||||
"play-dl": "^1.9.4",
|
"play-dl": "^1.9.4",
|
||||||
|
|||||||
Reference in New Issue
Block a user