dbeley / rymscraper

Python library to extract data from rateyourmusic.com.
MIT License
168 stars 25 forks source link

Dealing with identical artists' names #26

Open artjoms-formulevics opened 3 years ago

artjoms-formulevics commented 3 years ago

Is there a workaround for having multiple artists with the same name? Like for example there are many artists named 'Future': https://rateyourmusic.com/search?bx=c518a8649560e5985062f842520e8bb8&searchtype=a&searchterm=future

And network.get_discography_infos(name="Future") would get me the first one on the list.

But is there any way to specify which one I need? Or to extract more data on each of them and find it from other names, genre or something else?

dbeley commented 3 years ago

Hello! If the search is ambiguous, you can use the url argument in the function : network.get_discography_infos(url="https://rateyourmusic.com/artist/future-1")

Let me know if it fits what you're trying to do.

artjoms-formulevics commented 3 years ago

Hi there! Thanks a lot for the prompt reply! That indeed works for me to some extent. So I guess there is no way to, for instance, get all the artists associated with name 'Future' and then save them all?

If not, then not, just a question. Your library is already awesome, many thanks for it!