{"id":13624017,"url":"https://github.com/joinemm/spotify-to-lastfm","last_synced_at":"2025-04-15T20:33:01.101Z","repository":{"id":111077809,"uuid":"573008325","full_name":"joinemm/spotify-to-lastfm","owner":"joinemm","description":":musical_note: Analyze and bulk scrobble your spotify data package into Last.fm","archived":false,"fork":false,"pushed_at":"2023-11-01T09:42:05.000Z","size":162,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-08T12:42:48.562Z","etag":null,"topics":["lastfm","lastfm-api","spotify"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joinemm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-12-01T14:00:59.000Z","updated_at":"2024-10-25T07:50:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"266e9108-e385-43f1-a6db-efa29ce720f4","html_url":"https://github.com/joinemm/spotify-to-lastfm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joinemm%2Fspotify-to-lastfm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joinemm%2Fspotify-to-lastfm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joinemm%2Fspotify-to-lastfm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joinemm%2Fspotify-to-lastfm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joinemm","download_url":"https://codeload.github.com/joinemm/spotify-to-lastfm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249148263,"owners_count":21220505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lastfm","lastfm-api","spotify"],"created_at":"2024-08-01T21:01:37.857Z","updated_at":"2025-04-15T20:33:00.736Z","avatar_url":"https://github.com/joinemm.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# HOW TO USE\n\n## Step 1. Get your spotify data package\n\nNavigate your favourite browser to https://www.spotify.com/us/account/privacy/\n\nAt the bottom you will find this ![spotify image](docs/spotify_data_package.png)\n\nSelect `extended streaming history` and wait for you data package to arrive with the enthusiasm of a child waiting for their christmas present.\n\n## Step 2. Parse, filter and convert spotify json into scrobbleable json\n\n\u003e Before getting started you need to install Python and Git however you wish.\n\nClone this repo where you want it:\n\n```sh\ngit clone https://github.com/joinemm/spotify-to-lastfm\n\ncd spotify-to-lastfm\n```\n\nInstall dependencies:\n\n```sh\npython -m pip install -r requirements.txt\n```\n\nMove your spotify data.zip into this folder and extract it. You will find your scrobbling data in `./MyData`. Either keep it there or move it somewhere else. As long as you know the path.\n\nGet lastfm api credentials from https://www.last.fm/api/account/create. Application details can be whatever it doesn't matter.\n\nFill your key, secret, username, password and date of your first last.fm scrobble into the `example.credentials.env` file and **rename it to `credentials.env`** (eg. remove the `example.` prefix, this is for version management reasons)\n\nAlternatively you could supply these env variables in any other way you want.\n\n\u003e Any further commands assume your working directory is this repo\n\nConvert your data. For example with data in `./MyData` and splitting into 2600 scrobbles per day (more about that later):\n\n```sh\npython convert.py MyData 2600\n```\n\nThe resulting files will be split into json files in `/results/[n].json`\n\n## Optional step: Analyze\n\nAt this point you could do some light analysis of your listening by using `analyze.py` with a given json split.\n\nTo analyze all of it, use the `-A` flag with the folder name as the argument.\n\n```sh\npython analyze.py results/1.json\n\npython analyze.py -A results\n```\n\nTo see statistics per year, you can use the yearly script:\n\n```sh\npython yearly.py results\n```\n\n## Step 3. Scrobble tracks to lastfm\n\nReady to import all your long lost plays of deadmau5 from 2012?\n\nSelect a file to scrobble and watch the results. Scrobbling will happen in blocks of 50 tracks and every track will have it's timestamp shifted by a minute from another, starting from 2 weeks ago to keep your weekly stats not fucked up. Lastfm has a hard limit of ~2800 scrobbles per day so keep that in mind. Running this more than once per day with max scrobbles **will** get you rate limited.\n\n```sh\npython scrobble.py results/1.json [-v]\n```\n\nOptional `-v` parameter will list every track as it scrobbles.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoinemm%2Fspotify-to-lastfm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoinemm%2Fspotify-to-lastfm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoinemm%2Fspotify-to-lastfm/lists"}