SwapnilSoni1999 / spotify-dl

Spotify Downloader and alternative of Spotdl(python) tool made in NodeJS based on youtube-dl
MIT License
1.36k stars 146 forks source link

Error: Not a YouTube domain #18

Closed avremy closed 4 years ago

avremy commented 5 years ago

Hi I seem to be getting the following error on some songs,

spotifydl https://open.spotify.com/track/3Y7Gf7COnnFqrZZ7voGy22?si=-qYWxjvUQxiF9ivL2Wh3ww
ℹ Saving Song to: /home/avremy/Ben Fayga - Lipa.mp3

✔ Song: Ben Fayga - Lipa
⠋ Downloading...Something went wrong!
Error: Not a YouTube domain
    at Object.exports.getURLVideoID (/usr/local/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/util.js:279:12)
    at Object.exports.getVideoID (/usr/local/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/util.js:304:20)
    at Function.exports.(anonymous function) [as getInfo] (/usr/local/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/info.js:362:21)
    at ytdl (/usr/local/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/index.js:17:8)
    at downloader (/usr/local/lib/node_modules/spotify-dl/lib/downloader.js:14:20)
    at /usr/local/lib/node_modules/spotify-dl/cli.js:98:17
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

is this a known bug ?

thanks

SwapnilSoni1999 commented 5 years ago

probably issue with ytdl-core i guess try again by removing query (that thing with ?si=...)

avremy commented 5 years ago

Hi tried without the query and have the same response,

user53@home-Office:~$ spotifydl https://open.spotify.com/track/3Y7Gf7COnnFqrZZ7voGy22
ℹ Saving Song to: /home/avremy/Ben Fayga - Lipa.mp3

✔ Song: Ben Fayga - Lipa
⠋ Downloading...Something went wrong!
Error: Not a YouTube domain
    at Object.exports.getURLVideoID (/home/avremy/.node_modules_globa/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/util.js:279:12)
    at Object.exports.getVideoID (/home/avremy/.node_modules_globa/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/util.js:304:20)
    at Function.exports.<computed> [as getInfo] (/home/avremy/.node_modules_globa/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/info.js:362:21)
    at ytdl (/home/avremy/.node_modules_globa/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/index.js:17:8)
    at downloader (/home/avremy/.node_modules_globa/lib/node_modules/spotify-dl/lib/downloader.js:14:20)
    at /home/avremy/.node_modules_globa/lib/node_modules/spotify-dl/cli.js:98:17
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

thanks

SwapnilSoni1999 commented 4 years ago

seems weird can you try using a vpn to your system and check please

avremy commented 4 years ago
user53@home-Office:~$ spotifydl https://open.spotify.com/track/3Y7Gf7COnnFqrZZ7voGy22
ℹ Saving Song to: /home/avremy/Ben Fayga - Lipa.mp3
✔ Song: Ben Fayga - Lipa
⠧ Downloading 2.25MB of 5.60MB
✔ Download completed.
✔ Metadata Merged!

that seemed to fix it

thank you very much

what do you think could cause such it?

SwapnilSoni1999 commented 4 years ago
user53@home-Office:~$ spotifydl https://open.spotify.com/track/3Y7Gf7COnnFqrZZ7voGy22
ℹ Saving Song to: /home/avremy/Ben Fayga - Lipa.mp3
✔ Song: Ben Fayga - Lipa
⠧ Downloading 2.25MB of 5.60MB
✔ Download completed.
✔ Metadata Merged!

that seemed to fix it

thank you very much

what do you think could cause such it?

Maybe because that video on youtube (which it references to) might got a ban in your region

valkyrienyanko commented 4 years ago

Maybe add error handling so the program doesn't crash just because one song in the playlist was banned in your region.

SwapnilSoni1999 commented 4 years ago

will add thanks <3