Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MuseError: JSONPath expression "sectionListRenderer.contents[0],gridRenderer" returned nothing #9

Closed
AndaHendriksen opened this issue Apr 12, 2024 · 3 comments

Comments

@AndaHendriksen
Copy link

I'm trying to use get_artist_albums() but it returns the error:

MuseError: JSONPath expression "sectionListRenderer.contents[0],gridRenderer" returned nothing
    at j (https://deno.land/x/[email protected]/util.ts:33:11)
    at get_artist_albums (https://deno.land/x/[email protected]/mixins/browsing.ts:259:16)
    at eventLoopTick (ext:core/01_core.js:64:7)
    at async getYouTubeMusic (file:///home/deno/functions/discography/index.ts:59:20)
    at async Object.handler (file:///home/deno/functions/discography/index.ts:81:13)
    at async handleHttp (ext:sb_core_main_js/js/http.js:107:17) {
  name: "MuseError",
  code: 10
}

It could be because I don't know what to put in as "params"? I just put in an empty string because I can't seem to find info about what those params should be? https://deno.land/x/[email protected]/mod.ts?s=get_artist_albums

@vixalien
Copy link
Owner

Is this still the case?

@vixalien
Copy link
Owner

I'm sorry for this. It's poorly documented, but you will need to use the following pattern:

// first get the artist
const artist = await muse.get_artist("ARTIST_ID");

const albums_params = artist.albums.params;
// or artist.singles.params;
// then you can get the params that allow you to get more albums

if (albums_params) {
  const more_albums = muse.get_artist_albums("ARTIST_ID", albums_params);
}

@vixalien
Copy link
Owner

Closing due to inactivity

@vixalien vixalien closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants