Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #146
Closes #109
Closes #130
What
Thirteen methods called
services/*endpoints Shazam has retired. None of them failed cleanly: the edge answers a retired path with the website itself,200 text/html, so every call surfaced asFailedDecodeJsonand read like a parsing bug in this library rather than a removed endpoint upstream.Charts, on
master:and here:
Commit by commit:
The
User-Agentlist. 390 of the 490 strings were browser agents, andwww.shazam.comserves a browser the website (or a405) instead of the API. Only an agent shaped like the Shazam mobile app gets a real body — noUser-Agentat all,curl/8.xandokhttp/4.12.0all get the website too. The 390 browser strings are gone; the 100Dalvik/...ones stay.Thirteen methods removed:
artist_about,search_artist,search_track,listening_counter,listening_counter_many,artist_albums,artist_album_info,search_artist_v2,top_artist_tracks,top_tracks_playlistand friends.services/search/v3,search/v4andcount/v2answer404 Not supportedfrom the origin; the wholeservices/amapi/v1surface answers405at the edge — it was an Apple Music proxy the website replaced with server-side MusicKit calls. Nothing rescues them, so they are deleted rather than left raising.The five chart methods, rebuilt. Shazam publishes its charts as CSV under
services/charts/csv/...and nowhere else.top_world_tracks,top_country_tracks,top_city_tracks,top_world_genre_tracksandtop_country_genre_tracksreturnlist[ChartTrack], each row a rank, an artist and a title — three columns is everything the service publishes, so a chart entry no longer carries ids or artwork and cannot be fed toSerialize. Country, city and genre slugs are resolved throughservices/charts/locations, which supplies them asurlName.limitnow defaults to the whole chart andoffsetskips from the top; both are client-side, because the service ignores query parameters.regional-mexicanois dropped fromGenreMusic: it was renamed upstream and has no chart under either spelling.The schemas the removed methods were the only source of go with them, leaving
Serialize.trackandSerialize.full_track.HTTPClient.requestloses its*args, which existed only to forward a content type that was always the default.Examples and README. Every entry point started its loop with
asyncio.get_event_loop(), which raises on Python 3.14:They now use
asyncio.run(). The README demonstrated twelve methods that no longer reach an endpoint, and recognizeddora.ogg, which returns no match; it documents the eight live methods and recognizesexamples/data/Gloria.ogg.This is a breaking change for anyone calling the removed methods, and for anyone indexing a chart result as a dict.
How to test
just lint && just test— the suite includes live checks for all five charts, the slug resolution, track metadata and recognition.Every snippet in the README was executed against the live service before this was opened, as were
examples/*.py.