-
Notifications
You must be signed in to change notification settings - Fork 73
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
Get artist top tracks #47
Comments
It also gives me an error when I use the top track country code method |
i am also getting same error |
Hello @Epic-R-R, @Daxitdon. Now syntax: import asyncio
from shazamio import Shazam, Serialize
from shazamio.schemas.artists import ArtistQuery
from shazamio.schemas.enums import ArtistView
async def main():
shazam = Shazam()
artist_id = 1081606072
about_artist = await shazam.artist_about(
artist_id,
query=ArtistQuery(
views=[
ArtistView.TOP_SONGS,
],
),
)
serialized = Serialize.artist_v2(about_artist)
for i in serialized.data[0].views.top_songs.data:
print(i.attributes.name)
loop = asyncio.get_event_loop_policy().get_event_loop()
loop.run_until_complete(main()) Result:
Web: |
Merged
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use this artist_id 1304716885 for get details from artist and it work fine
but when I want to get top track from this artist it show me error
shazamio.exceptions.FailedDecodeJson: Check args, URL is invalid URL- https://cdn.shazam.com/shazam/v3/en/GB/web/-/tracks/artisttoptracks_1304716885?startFrom=0&pageSize=3&connected=&channel=
I use this artist_id 201896832 you put in the example file and it works but for another artist, it gives an error
The text was updated successfully, but these errors were encountered: