2022-04-30 21:45:03 -04:00
|
|
|
const hastebin = require("hastebin-gen");
|
|
|
|
|
|
2022-03-10 20:30:03 -05:00
|
|
|
module.exports ={
|
2022-05-13 22:03:05 +03:00
|
|
|
name: "scrape",
|
2022-03-10 20:30:03 -05:00
|
|
|
description: ".....",
|
2022-05-13 22:03:05 +03:00
|
|
|
async execute(message, args, Discord, Client, bot) {
|
2022-03-10 20:30:03 -05:00
|
|
|
const axios = require('axios');
|
|
|
|
|
const cheerio = require('cheerio')
|
|
|
|
|
const url = args[0];
|
|
|
|
|
axios(url)
|
2022-04-30 21:45:03 -04:00
|
|
|
.then(async response => {
|
2022-03-10 20:30:03 -05:00
|
|
|
const html = response.data;
|
|
|
|
|
const $ = cheerio.load(html);
|
2022-04-30 21:07:16 -04:00
|
|
|
//lyrics = $('.para_row').text();
|
2022-04-30 21:45:03 -04:00
|
|
|
const haste = await hastebin(html, { extension: "txt" });
|
|
|
|
|
message.channel.send(haste);
|
2022-04-30 21:09:16 -04:00
|
|
|
// console.log(lyrics);
|
2022-03-10 20:30:03 -05:00
|
|
|
})
|
|
|
|
|
.catch(console.error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//TEST: https://www.karaoketexty.cz/texty-pisni/zoegirl/plain-170199
|