Skip to content
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

fix: iterate over results pages when searching for artist #290

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

wtain
Copy link

@wtain wtain commented Dec 23, 2024

Problem

When searching for a specific artist by name it currently requests 3 results per page per section (default value), not iterating over the next pages.
In this example it happens that the artist of interest comes on the second page, despite full name match, and returns a different artist ("BiC Fizzle"):

genius = Genius("<TOKEN HERE>")
artist = genius.search_artist("Norther", allow_name_change=False)

Solution

Iterate over the results until we found the requested artist.

Further steps

Use same search technique for other entities like songs and albums.

@wtain wtain marked this pull request as ready for review December 23, 2024 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant