diff --git a/lib/parser/contents/classes/MusicResponsiveListItem.js b/lib/parser/contents/classes/MusicResponsiveListItem.js index 40e7301a..50d974b5 100644 --- a/lib/parser/contents/classes/MusicResponsiveListItem.js +++ b/lib/parser/contents/classes/MusicResponsiveListItem.js @@ -104,13 +104,13 @@ class MusicResponsiveListItem { this.views = this.#flex_columns[1].title.runs .find((run) => run.text.match(/(.*?) views/)).text; - const author = this.#flex_columns[1].title.runs.find((run) => run.endpoint.browse?.id.startsWith('UC')); + const authors = this.#flex_columns[1].title.runs?.filter((run) => run.endpoint.browse?.id.startsWith('UC')); - author && (this.author = { + authors && (this.authors = authors.map((author) => ({ name: author.text, channel_id: author.endpoint.browse.id, endpoint: author.endpoint - }); + }))) && (this.author = this.authors[0]); const duration_text = this.#flex_columns[1].title.runs .find((run) => /^\d+$/.test(run.text.replace(/:/g, '')))?.text; diff --git a/typings/lib/parser/contents/classes/MusicResponsiveListItem.d.ts b/typings/lib/parser/contents/classes/MusicResponsiveListItem.d.ts index 6eb1d8b6..ced0584c 100644 --- a/typings/lib/parser/contents/classes/MusicResponsiveListItem.d.ts +++ b/typings/lib/parser/contents/classes/MusicResponsiveListItem.d.ts @@ -37,6 +37,11 @@ declare class MusicResponsiveListItem { channel_id: any; endpoint: any; }; + authors: { + name: any; + channel_id: any; + endpoint: any; + }[]; name: any; subscribers: any; year: any;