sigma67 / spotify_to_ytmusic

Clone a Spotify playlist to YouTube Music
MIT License
790 stars 65 forks source link

Playlist creation failing silently #73

Open duncan-bayne opened 8 months ago

duncan-bayne commented 8 months ago

Firstly, thanks for spotify_to_ytmusic :heart:

I've used it successfully in the past, but I'm having an issue now. I've configured Spotify and Google via OAuth, and have run with:

$ spotify_to_ytmusic all user-foo

It seems to work, finding YouTube tracks, and creating playlists:

Playlist 2: Rory
Getting Spotify tracks...
Spotify tracks: 14/14
Searching YouTube...
YouTube tracks: 10/14
Success: created playlist 'Rory' at
https://music.youtube.com/playlist?list={'responseContext': {'visitorData': 'REDACTED', 'serviceTrackingParams': [{'service': 'CSI', 'params': [{'key': 'c', 'value': 'WEB_REMIX'}, {'key': 'cver', 'value': '1.20231014.01.00'}, {'key': 'yt_li', 'value': '1'}, {'key': 'CreatePlaylist_rid', 'value': '0x6c2c51d61fc34166'}]}, {'service': 'GFEEDBACK', 'params': [{'key': 'logged_in', 'value': '1'}, {'key': 'e', 'value': '23804281,23858057,23946420,23966208,23983296,23998056,24004644,24007246,24034168,24036948,24077241,24080738,24120820,24135310,24140247,24181174,24186125,24187377,24241378,24255543,24255545,24288664,24290971,24362597,24367579,24371779,24377320,24377598,24377909,24379125,24379354,24379964,24379969,24382552,24385612,24386593,24389127,24389130,24390675,24391689,24428788,24439361,24451319,24458317,24458324,24458329,24458839,24466624,24468724,24485421,24506625,24506784,24515423,24518452,24519102,24520147,24520975,24524098,24526515,24526642,24526772,24526783,24526790,24526799,24526808,24526815,24526823,24528463,24528468,24528477,24528484,24528548,24528557,24528573,24528584,24528642,24528647,24528661,24528664,24529354,24529363,24537200,24542367,24542452,24543277,24546060,24546075,24547939,24548138,24548627,24548629,24548854,24549786,24550285,24559327,24560416,24560687,24561136,24561156,24561210,24563746,24566687,24566937,24569887,24581275,24585758,24585907,24588352,24588590,24632205,24650809,24694842,24696752,24697013,24697068,24698452,39324156,39324942,51003636,51004018,51006181,51009655,51009699,51009781,51009900,51010235,51010680,51010768,51011488,51011713,51012165,51012290,51012331,51014091,51015206,51016856,51018866,51019442,51019560,51019626,51020406,51020570,51021953,51024036,51024077,51024086,51025415,51025833,51026208,51026938,51027796,51027870,51028271,51030101,51030300,51030311,51030435,51030815,51030875,51031412,51032492,51033399,51033577,51033903,51034286,51034519,51034526,51034886,51035244,51035372,51036440,51036735,51037342,51037351,51038399,51040473,51041294,51041335,51042257'}]}, {'service': 'ECATCHER', 'params': [{'key': 'client.version', 'value': '1.20000101'}, {'key': 'client.name', 'value': 'WEB_REMIX'}, {'key': 'client.fexp', 'value': '51037351,24004644,24563746,24561136,39324156,23983296,51014091,24385612,24528548,51016856,51019560,24528584,24519102,24650809,51030311,24077241,24458324,24391689,23804281,24529354,24367579,24458317,24581275,24528642,24390675,24288664,51011488,24255545,24697068,24428788,24696752,24007246,51006181,24379969,51024077,24528664,24537200,24120820,24566937,24371779,51026938,24550285,24560416,24561156,51019626,24548854,24140247,24362597,51010768,24526515,24036948,51010680,51038399,51036440,51037342,51027796,24187377,51032492,24546075,24528557,24389130,24549786,24528463,51041294,51034519,51030435,24135310,24546060,24529363,51042257,24255543,39324942,23946420,51036735,51028271,51025833,51025415,24468724,51010235,24528477,51033577,24524098,24543277,24560687,51024086,24585758,24526823,24186125,24548629,51034526,24466624,24528484,24528573,51031412,24526772,24526815,51012290,51009781,51030815,24569887,24566687,24526808,24547939,23998056,24485421,24526642,24694842,24506625,24034168,51020570,51033903,51018866,24377320,24559327,24379125,24382552,24548138,24585907,51027870,51030300,24698452,51033399,24528468,24632205,24386593,24451319,24542452,51041335,51024036,23858057,51030875,51034886,24588352,24439361,24377909,24379354,51019442,24588590,24548627,24518452,51011713,24458839,24520975,51020406,51040473,24528661,24241378,51026208,24526799,24561210,23966208,24458329,51012331,24528647,51021953,24290971,51009900,51035372,51034286,51009699,24379964,24080738,51003636,51030101,51012165,24520147,24515423,24377598,24506784,24542367,51004018,24697013,51009655,24181174,51015206,24526783,51035244,24526790,24389127'}]}]}, 'actions': [{'clickTrackingParams': 'CAAQ2c0EIhMI78aG5pD1gQMVuftMAh2lqw17', 'channelCreationFormEndpoint': {'channelCreationToken': 'REDACTED', 'source': 'CREATE_PLAYLIST_PRIVACY_DROPDOWN_CHANNEL_CREATION_SOURCE'}}], 'trackingParams': 'CAAQ2c0EIhMI78aG5pD1gQMVuftMAh2lqw17'}

However, I don't see any playlists in my library:

playlists

Any idea what I might be doing wrong?

System details:

sigma67 commented 8 months ago

What's your ytmusicapi version? pip show ytmusicapi

The playlist link looks pretty broken

duncan-bayne commented 8 months ago
$ pip-3.9 show ytmusicapi
Name: ytmusicapi
Version: 1.3.0
Summary: Unofficial API for YouTube Music
Home-page: 
Author: 
Author-email: sigma67 <ytmusicapi@gmail.com>
License: MIT License

        Copyright (c) 2020 sigma67

        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:

        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.

        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.

Location: /usr/home/duncan/.local/lib/python3.9/site-packages
Requires: requests
Required-by: spotify-to-ytmusic
sigma67 commented 8 months ago

This does not reproduce for me, You're probably in some kind of YouTube Music A/B test.

If the playlist creation succeeded it should show up in your web interface though. Do you have multiple Google or brand accounts perhaps?

thrust15 commented 8 months ago

I have the same issue. spotify_to_ytmusic liked works without a hitch, but spotify_to_ytmusic all user I get the same results as OP

mueckinger commented 7 months ago

same issue

The-Spartan commented 5 months ago

Solved this issue by creating a channel for the account specified in youtube.

Go to the youtube app on your phone, bottom right ("You" tab) -> create channel underneath your name at the top. After you confirm a few agreement messages, try again.

You need a channel before you create playlists on YT Music.