-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent results when searching uploads #193
Comments
No, that's the first time I've heard of something like that. It would be great if you could provide a screenshot of a specific query in the YTM web interface, and the result of the same query when using ytmusicapi. Perhaps you could even narrow down the cause if you're able to figure out the characteristics of songs are not being returned. |
For some background, I migrated a large library of MP3s from Google Play Music to Youtube Music. Searches in the browser for simple song titles were coming back fine, but using this API, occasional errors. The places in code I tracked it down to were areas where data structures were expected to be populated a certain way and were not. I added 4 lines of changes that alleviated it. I can submit a pull request if you like. Here are the changes ... #ytmusicapi/parsers/browsing.py" line 84 of 220 #ytmusicapi/parsers/browsing.py" line 85 of 220 #ytmusicapi/parsers/browsing.py" line 98 of 220 #ytmusicapi/parsers/utils.py" line 147 of 166 I can provide all of the use cases that required these changes in order to work . |
Thanks! It would be great if you could submit a PR with these changes and a bit of reasoning why each of them is necessary. |
Ok I went ahead and submitted a PR. |
And here is a Google Doc with screenshots of search results compared from browser to using the API. https://docs.google.com/document/d/1SPs0KqeVSYGBtypUfqFFY4hSiNqc8BSMhSF3_MxV9gg/edit?usp=sharing |
Latest changes to master correct these issues. |
First off - thanks for writing this!
I am seeing inconsistent results when searching uploads. I have about 75K uploaded songs and am looking to build playlists with those songs only. I have been able to find about 75% of them in searches using the API.
ytm = YTMusic('headers_auth.json')
searchFor = artist + " - " + album + " - " song
ytm.search(searchFor, 'uploads', limit=40)
I have adjusted the contents of the "searchFor" variable to be song only, artist plus song, and the format above which includes the album name too (which seems to be the best in terms of getting results).
But there are still many songs I can search for in Youtube Music via browser and show up but I simply cannot get them to be returned by the API.
I am happy to provide more details, screen shots and/or write code patches if need be. I was just wondering if this was a known issue or anyone else had encountered it.
The text was updated successfully, but these errors were encountered: