Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
How to fetch any LastFM user track history without API key
Requirements:
- Linux (tested on Manjaro, might work as well on others)
- git (ubuntu/debian:
sudo apt install git
arch/manjaro:sudo pacman -S git
fedora/centos:sudo dnf install git
alpine:apk add git
) - Any recent browser (Tested on Google Chrome Version 85.0.4183.121 (Official Build) (64-bit))
Process
- Clone the benfoxall/lastfm-to-csv github repo:
git clone https://github.com/benfoxall/lastfm-to-csv
- Enter the folder:
cd lastfm-to-csv
- Open your browser with index.html:
google-chrome-stable index.html
- On the page, type-in the lastfm user name and press "Fetch tracks"
- Wait for the fetch to complete and click on "Save"
- Done!
Notes
- In the HTML file (index.html) it says that ideally you'll have to use your own API key. However, I've tried with the default one and it worked flawlessly.
- Warning: users with a lot of tracks will take a lot of time to fetch (can be several hours) and resulting file will be pretty large (might be 100 mb or more)
- On average, 500 pages of data = ~ 5 mb file
What to do with this data?
- Find the most frequently played tracks!
- Build some statistics on user, it's favourite tracks or genres
Add Comment
Please, Sign In to add comment