dbeley / rymscraper

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

Make charts url creator more user friendly + two bug fixes #38

Closed Vuizur closed 1 year ago

Vuizur commented 1 year ago

Hello!

Thanks for merging my other PR :)

I thought it would be a good idea to change the chart URL creator so that it can be used like:

url = RymUrl(kind="album", year="2010s", genres="ambient,blues", descriptors="atmosphere,form,theme,bittersweet,epic", origin_countries="algeria,bouvet-island-bouvetoya,europe,antarctica-1", page=1)
# Generates https://rateyourmusic.com/charts/top/album/2010s/g:ambient,blues/loc:algeria,bouvet-island-bouvetoya,europe,antarctica-1/d:atmosphere,form,theme,bittersweet,epic/1/

If you think it makes sense like this then I'll also change the documentation in other places.

Vuizur commented 1 year ago

This branch also fixes two other problems: The fact that for Russian artists the name was displayed like Vesna VesnaВесна Весна, this has been changed to Vesna Vesna [Весна Весна] like on the webpage (much easier to parse). And it also fixes https://github.com/dbeley/rymscraper/issues/39 .

The only thing that I haven't tested yet is the CLI tool that you created to get the charts, but I have adapted the code at least so that in theory it should work.

I don't know about the pipeline, the error seems to be that geckodriver is not in PATH, which should not be related (?).

dbeley commented 1 year ago

Hey thanks again for your work :slightly_smiling_face: !

Regarding the chart.py file it's all good I tested it myself.

Also I ran the test suite locally (unfortunately as you saw the CI is kind of broken) and there was small changes to make but I will push those commits after your PR so it's all good :+1:

1669139655_cropped

Don't hesitate if you have more ideas :smile:

Vuizur commented 1 year ago

Awesome, thank you very much :)