[GH-ISSUE #327] No BrowseId in ytmusic.get_watch_playlist when running repl.it #254

Closed
opened 2026-02-27 22:08:50 +03:00 by kerem · 3 comments
Owner

Originally created by @lmjaedentai on GitHub (Dec 11, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/327

I use get_watch_playlist to get to lyrics as BrowseId in get_lyrics

image
search = "因为你所以我" #some taiwanese song, usually English song works perfectly without errors
searchresult = ytmusic.search(query=search,filter='songs',limit=1)
rawsong = ytmusic.get_watch_playlist(searchresult[0]["videoId"])
print(rawsong[lyrics]) #browseId for get_lyrics

When I run this code in my pc, i can get the result I want

MPLYt_27ndWY9eEBp-1

But when I run this code in repl.it, the result is None

image

When I passed a valid BrowseId in get_lyrics in repl.it

l = ytmusic.get_lyrics(browseId='MPLYt_6dtfdY3Qa8g-1')

I still cant get the result, but same code in my pc can get the result (the lyrics) I want

How can I solve this error?

Originally created by @lmjaedentai on GitHub (Dec 11, 2022). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/327 I use [`get_watch_playlist`](https://ytmusicapi.readthedocs.io/en/stable/reference.html?highlight=%20get_watch_playlist#ytmusicapi.YTMusic.get_watch_playlist) to get to lyrics as `BrowseId` in [`get_lyrics`](https://ytmusicapi.readthedocs.io/en/stable/reference.html?highlight=lyrics#ytmusicapi.YTMusic.get_lyrics) <img width="333" alt="image" src="https://user-images.githubusercontent.com/63090071/206894905-1a42bcb4-5aae-4fc6-b15b-2797faa7efd4.png"> ```py search = "因为你所以我" #some taiwanese song, usually English song works perfectly without errors searchresult = ytmusic.search(query=search,filter='songs',limit=1) rawsong = ytmusic.get_watch_playlist(searchresult[0]["videoId"]) print(rawsong[lyrics]) #browseId for get_lyrics ``` When I run this code in my pc, i can get the result I want ``` MPLYt_27ndWY9eEBp-1 ``` But when I run this code in repl.it, the result is None <img width="221" alt="image" src="https://user-images.githubusercontent.com/63090071/206895066-0b88ae07-aa6d-4427-9159-c3cfa8d34ed8.png"> --- When I passed a valid BrowseId in [`get_lyrics`](https://ytmusicapi.readthedocs.io/en/stable/reference.html?highlight=lyrics#ytmusicapi.YTMusic.get_lyrics) in repl.it ```py l = ytmusic.get_lyrics(browseId='MPLYt_6dtfdY3Qa8g-1') ``` I still cant get the result, but same code in my pc can get the result (the lyrics) I want How can I solve this error?
kerem 2026-02-27 22:08:50 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@sigma67 commented on GitHub (Dec 11, 2022):

From the limited information you have given it seems likely that there is a difference between the two environments, like different credentials

<!-- gh-comment-id:1345526414 --> @sigma67 commented on GitHub (Dec 11, 2022): From the limited information you have given it seems likely that there is a difference between the two environments, like different credentials
Author
Owner

@lmjaedentai commented on GitHub (Dec 11, 2022):

From the limited information you have given it seems likely that there is a difference between the two environments, like different credentials

Yes that's all I know. Is the reason possible to be repl.it rate-limit by official youtube music api? Therefore, ytmusicapi cannot return the correct value

<!-- gh-comment-id:1345555068 --> @lmjaedentai commented on GitHub (Dec 11, 2022): > From the limited information you have given it seems likely that there is a difference between the two environments, like different credentials Yes that's all I know. Is the reason possible to be repl.it rate-limit by official youtube music api? Therefore, ytmusicapi cannot return the correct value
Author
Owner

@sigma67 commented on GitHub (Dec 12, 2022):

I don't think that's the issue. As the lyrics key is None, it seems that your instance is not properly authenticated. Can you get other library endpoints, like get_library_playlists in repl.it?

<!-- gh-comment-id:1346764249 --> @sigma67 commented on GitHub (Dec 12, 2022): I don't think that's the issue. As the lyrics key is None, it seems that your instance is not properly authenticated. Can you get other library endpoints, like get_library_playlists in repl.it?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#254
No description provided.