{"id":19700204,"url":"https://github.com/dbeley/lastfm-scraper","last_synced_at":"2025-04-29T13:31:45.159Z","repository":{"id":37357518,"uuid":"183707488","full_name":"dbeley/lastfm-scraper","owner":"dbeley","description":"Scripts to extract data from lastfm.","archived":false,"fork":false,"pushed_at":"2024-05-12T00:07:48.000Z","size":125,"stargazers_count":18,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-12T01:23:43.225Z","etag":null,"topics":["lastfm","lastfm-dataset"],"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/dbeley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-26T23:53:46.000Z","updated_at":"2024-05-12T01:23:45.884Z","dependencies_parsed_at":"2024-05-12T01:23:45.623Z","dependency_job_id":"f5663f37-4c86-4b5f-9d73-c2c94440de1b","html_url":"https://github.com/dbeley/lastfm-scraper","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/dbeley%2Flastfm-scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbeley%2Flastfm-scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbeley%2Flastfm-scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbeley%2Flastfm-scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbeley","download_url":"https://codeload.github.com/dbeley/lastfm-scraper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224175749,"owners_count":17268390,"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-dataset"],"created_at":"2024-11-11T21:04:43.543Z","updated_at":"2024-11-11T21:04:44.131Z","avatar_url":"https://github.com/dbeley.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lastfm-scraper\n\nScripts to extract data from lastfm.\n\nThe scripts need a valid config file with your lastfm API keys (get them at last.fm/api.) in a `config.ini` file (see `config_sample.ini` for an example).\n\n- `lastfm-artists_by_genre` : Export artists name from one or several genres to csv files (2 backends available, beautifulsoup4 and pylast).\n- `lastfm-artists_infos` : Export data for one or several artists (Fields : Name, URL, Listeners, Playcount, Country, Tags, Top Tracks, Top Albums, Similar Artists). Slow (~10s/artist)\n- `lastfm-complete_timeline` : Export all the scrobbles of one or several users in csv files (Fields : Artist, Album, Title, Date, Timestamp).\n- `lastfm-all_favorite_tracks` : Export all favorite tracks of one or several users in csv files (Format : Artist - Track)\n\n## Requirements\n\n- bs4\n- lxml\n- numpy\n- pandas\n- requests\n- pylast\n\n## Usage\n\n```\npython lastfm-artists_by_genre_pylast.py -g \"pop,rock,metal,jazz,indie rock\"\npython lastfm-artists_infos.py -a \"daft punk,u2,radiohead\"\npython lastfm-complete_timeline.py -u USERNAME\npython lastfm-all_favorite_tracks -u USERNAME\n```\n\n## Help\n\n### lastfm-artists_by_genre_pylast\n\n```\npython lastfm-artists_by_genre_pylast.py -h\n```\n\n```\nusage: lastfm-artists_by_genre_pylast.py [-h] [--debug] [-g GENRES]\n\nGenre lastfm scraper\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --debug               Display debugging information\n  -g GENRES, --genres GENRES\n                        Genres to scrap (separated by comma)\n```\n\n### lastfm-artists_infos\n\n```\npython lastfm-artists_infos.py -h\n```\n\n```\nusage: lastfm-artists_infos.py [-h] [--debug] [-f FILE] [-a ARTIST]\n\nExtract infos from artists from a timeline or from a list\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --debug               Display debugging information\n  -f FILE, --file FILE  File containing the timeline to extract the unique\n                        artists from\n  -a ARTIST, --artist ARTIST\n                        Artists (separated by comma)\n```\n\n### lastfm-complete_timeline\n\n```\npython lastfm-complete_timeline.py -h\n```\n\n```\nusage: lastfm-complete_timeline.py [-h] [--debug] [--file FILE]\n                                   [--username USERNAME]\n\nExtract complete or partial lastfm timeline from an user\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --debug               Display debugging information\n  --file FILE, -f FILE  File already containing a timeline\n  --username USERNAME, -u USERNAME\n                        Name of the user\n```\n\n### lastfm-artists_by_genre_bs4 (deprecated)\n\n```\npython lastfm-artists_by_genre_bs4.py -h\n```\n\n```\nusage: lastfm-artists_by_genre_bs4.py [-h] [--debug] [-g GENRES]\n\nGenre lastfm scraper\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --debug               Display debugging information\n  -g GENRES, --genres GENRES\n                        Genres to scrap (separated by comma)\n```\n\n### lastfm-all_favorite_tracks\n\n```\npython lastfm-all_favorite_tracks.py -h\n```\n\n```\nusage: lastfm-all_favorite_tracks.py [-h] [--debug] [--username USERNAME]\n\nExtract all favorite tracks from one or several lastfm users.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --debug               Display debugging information.\n  --username USERNAME, -u USERNAME\n                        Names of the users (separated by comma).\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbeley%2Flastfm-scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbeley%2Flastfm-scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbeley%2Flastfm-scraper/lists"}