Download last_fm_to_csv.py
from this Gist (you might have to click "Raw" and then right-click and select "Save as").
You'll need an API key from last.fm, which you can get here. You can leave every field apart from Contact email and Application name blank.
Once you've got the API key, run the following in a terminal (assuming last_fm_to_csv.py
got downloaded to your Downloads folder):