Skip to content

HTML parsing error due to captcha #41

@leecheeyong

Description

@leecheeyong

I got this error when I tried to use this module without the API key, which scrapes the genius lyrics.

undefined:1
<!DOCTYPE html>
^

SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at SongsClient.<anonymous> (/home/runner/terminal/node_modules/genius-lyrics/dist/songs/client.js:47:37)
    at Generator.next (<anonymous>)
    at fulfilled (/home/runner/terminal/node_modules/genius-lyrics/dist/songs/client.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
const Genius = require("genius-lyrics");
const Client = new Genius.Client();
(async () => {
const searches = await Client.songs.search("faded");


const firstSong = searches[0];
console.log("About the Song:\n", firstSong, "\n");
console.log(firstSong)
})();

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is neededseverity: mediumMedium Severity

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions