{"id":22350247,"url":"https://github.com/hp0404/lastfm-to-sqlite","last_synced_at":"2025-07-30T06:31:35.150Z","repository":{"id":47104759,"uuid":"307062779","full_name":"hp0404/lastfm-to-sqlite","owner":"hp0404","description":"Scrape LAST.FM user's playlists to SQLite","archived":false,"fork":false,"pushed_at":"2021-09-13T11:59:50.000Z","size":56,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-23T03:26:44.684Z","etag":null,"topics":["lastfm","lastfm-api","sqlite-utils"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hp0404.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}},"created_at":"2020-10-25T09:18:42.000Z","updated_at":"2022-04-14T06:51:49.000Z","dependencies_parsed_at":"2022-09-16T23:51:44.252Z","dependency_job_id":null,"html_url":"https://github.com/hp0404/lastfm-to-sqlite","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/hp0404/lastfm-to-sqlite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hp0404%2Flastfm-to-sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hp0404%2Flastfm-to-sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hp0404%2Flastfm-to-sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hp0404%2Flastfm-to-sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hp0404","download_url":"https://codeload.github.com/hp0404/lastfm-to-sqlite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hp0404%2Flastfm-to-sqlite/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267822224,"owners_count":24149590,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","sqlite-utils"],"created_at":"2024-12-04T11:10:58.901Z","updated_at":"2025-07-30T06:31:34.871Z","avatar_url":"https://github.com/hp0404.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lastfm\r\n\r\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/hp0404/lastfm/blob/main/LICENSE)\r\n[![codecov](https://codecov.io/gh/hp0404/lastfm-to-sqlite/branch/main/graph/badge.svg?token=31KSGMRE8C)](https://codecov.io/gh/hp0404/lastfm-to-sqlite)\r\n[![Documentation Status](https://readthedocs.org/projects/lastfm/badge/?version=latest)](https://lastfm.readthedocs.io/en/latest/?badge=latest)\r\n\r\n\r\n- Scrape [LAST.FM](https://www.last.fm/) user's playlists to SQLite. \r\n- Docs: https://lastfm.readthedocs.io/en/latest/\r\n\r\n## Usage\r\n\r\n    pip install lastfm-to-sqlite\r\n\r\nNow run CLI:\r\n\r\n    lastfm export 244ec3b62b2501514191234eed07c75d lastfm_dump.db --user Way4Music\r\n\r\nThat will use (or create) a SQLite database called `lastfm_dump.db` and a table called `playlist` to export user's entire playlist. \r\n\r\nTo scrape specific dates, use `--start_date` and `--end_date`:\r\n\r\n    lastfm export 244ec3b62b2501514191234eed07c75 lastfm_dump.db --user way4music --start_date 2021-08-21 --end_date 2021-09-01\r\n    \r\n    \r\nPython-based API works like this: \r\n\r\n    from lastfm import LastFM\r\n\r\n    # specific date, ommit start_date and end_date to download all tracks\r\n    api = LastFM(\r\n        api=\"244ec3b62b2501514191234eed07c75d\",\r\n        username=\"way4music\",\r\n        start_date=\"2021-08-21\",\r\n        end_date=\"2021-09-01\"\r\n    )\r\n    data = api.fetch()\r\n    song = next(data)\r\n    print(song)\r\n    container = []\r\n    for item in data:\r\n        container.append(item)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhp0404%2Flastfm-to-sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhp0404%2Flastfm-to-sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhp0404%2Flastfm-to-sqlite/lists"}