This commit is contained in:
Dragon Fire
2021-03-09 20:39:48 -05:00
parent 4b0b2c9ebb
commit 5d9e4affe4
+1 -1
View File
@@ -117,7 +117,7 @@ module.exports = class GuessSongCommand extends Command {
}
async fetchAlternativePreview(id) {
const { text } = await request.get(`https://open.spotify.com/embed/track/${id}`);
const { text } = await request.get(`https://open.spotify.com/embed/track/${id}`);
const $ = cheerio.load(text);
return JSON.parse(decodeURIComponent($('script[id="resource"]')[0].children[0].data)).preview_url;
}