b5i / apple-playlist-downloader-cli

https://www.npmjs.com/package/apple-playlist-downloader
13 stars 3 forks source link

TypeError: Cannot read properties of undefined (reading '0') #2

Closed andreatitolo closed 1 year ago

andreatitolo commented 2 years ago

Hi! First of all, thanks for making the CLI from the apple downloader. Today I was trying to download some songs but the terminal returned this error: TypeError: Cannot read properties of undefined (reading '0')

Is it related to a malfunctioning of https://slider.kz/ in any way? Or am I doing something wrong?

The entire output from the terminal is below:

apd "https://music.apple.com/it/playlist/chill-and-stuff/pl.u-06oxpo6tjMG3m6?l=en"
STARTING....
Total songs:74
/Users/andreatitolo/.nvm/versions/node/v17.3.0/lib/node_modules/apple-playlist-downloader/bin/app.js:149
  if (!data["audios"][""][0].id) {
                         ^

TypeError: Cannot read properties of undefined (reading '0')
    at getURL (/Users/andreatitolo/.nvm/versions/node/v17.3.0/lib/node_modules/apple-playlist-downloader/bin/app.js:149:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Node.js v17.3.0

Thanks and apologies if this is an issue out of your control :)

b5i commented 2 years ago

Hi! First of all, thanks for making the CLI from the apple downloader.

You're welcome🙏

Today I was trying to download some songs but the terminal returned this error: TypeError: Cannot read properties of undefined (reading '0')

Is it related to a malfunctioning of https://slider.kz/ in any way? Or am I doing something wrong?

The entire output from the terminal is below:

apd "https://music.apple.com/it/playlist/chill-and-stuff/pl.u-06oxpo6tjMG3m6?l=en"
STARTING....
Total songs:74
/Users/andreatitolo/.nvm/versions/node/v17.3.0/lib/node_modules/apple-playlist-downloader/bin/app.js:149
  if (!data["audios"][""][0].id) {
                         ^

TypeError: Cannot read properties of undefined (reading '0')
    at getURL (/Users/andreatitolo/.nvm/versions/node/v17.3.0/lib/node_modules/apple-playlist-downloader/bin/app.js:149:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Node.js v17.3.0

Thanks and apologies if this is an issue out of your control :)

I think that the website slider.kz has made a few changes and now they ban IP addresses that download too many songs. This is only a theory but I'll investigate to know how those bans happen.

andreatitolo commented 2 years ago

I think that the website slider.kz has made a few changes and now they ban IP addresses that download too many songs. This is only a theory but I'll investigate to know how those bans happen.

I see, thank you for explaining! :)

Diluka commented 2 years ago

same error

and I can't even search at the website

b5i commented 2 years ago

same error

and I can't even search at the website

I'm working on an alternative for slider.kz, so there won't be any limit for download and it'll be ok.

b5i commented 1 year ago

This issue should be resolved with the Shubham's commits.