{"id":22051771,"url":"https://github.com/3jackdaws/soundcloud-lib","last_synced_at":"2025-04-12T21:20:17.029Z","repository":{"id":49128511,"uuid":"117056051","full_name":"3jackdaws/soundcloud-lib","owner":"3jackdaws","description":"Soundcloud API wrapper for tracks \u0026 playlists that doesn't require API credentials.  Asyncio support.","archived":false,"fork":false,"pushed_at":"2024-11-10T00:15:27.000Z","size":4043,"stargazers_count":95,"open_issues_count":10,"forks_count":24,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T00:37:19.466Z","etag":null,"topics":[],"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/3jackdaws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2018-01-11T05:48:12.000Z","updated_at":"2024-12-13T15:57:42.000Z","dependencies_parsed_at":"2025-01-15T14:09:04.533Z","dependency_job_id":"85c11a3d-0406-41ad-9c80-a38c75cd6b93","html_url":"https://github.com/3jackdaws/soundcloud-lib","commit_stats":{"total_commits":53,"total_committers":12,"mean_commits":4.416666666666667,"dds":0.679245283018868,"last_synced_commit":"84aff917a8f5c8a858927c82898debcefb9f79c3"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3jackdaws%2Fsoundcloud-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3jackdaws%2Fsoundcloud-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3jackdaws%2Fsoundcloud-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3jackdaws%2Fsoundcloud-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3jackdaws","download_url":"https://codeload.github.com/3jackdaws/soundcloud-lib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248632215,"owners_count":21136645,"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":[],"created_at":"2024-11-30T15:11:00.580Z","updated_at":"2025-04-12T21:20:16.954Z","avatar_url":"https://github.com/3jackdaws.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Soundcloud-lib\nThis Soundcloud API doesn't require a user-provided client ID to function because it scrapes one from public soundcloud pages.  \n\n![Version](https://img.shields.io/badge/version-0.6.0-blue.svg)\n\n# Features\n* Can resolve tracks and playlists from URLs\n* Can download and write the MP3 representation of a Track to a file\n* Fetches and writes mp3 metadata (Album artist, title, artwork)\n* Can fetch entire playlists of tracks\n* Asyncio support through `sclib.asyncio`\n\n# Installation\nThis library is installable as a pip package.\n```\npip install soundcloud-lib\n```\n\n## Saving an mp3 to a file.\nThis will write the ID3 tags for album artist, track title AND will embed the album artwork into the mp3.\n```python\nfrom sclib import SoundcloudAPI, Track, Playlist\n\n# do not pass a Soundcloud client ID that did not come from this library, but you can save a client_id that this lib found and reuse it\napi = SoundcloudAPI()  \ntrack = api.resolve('https://soundcloud.com/itsmeneedle/sunday-morning')\n\nassert type(track) is Track\n\nfilename = f'./{track.artist} - {track.title}.mp3'\n\nwith open(filename, 'wb+') as file:\n    track.write_mp3_to(file)\n\n```\n\n\n## Fetch a playlist\n\n```python\nfrom sclib import SoundcloudAPI, Track, Playlist\n\napi = SoundcloudAPI()\nplaylist = api.resolve('https://soundcloud.com/playlist_url')\n\nassert type(playlist) is Playlist\n\nfor track in playlist.tracks:\n    filename = f'./{track.artist} - {track.title}.mp3'\n    with open(filename, 'wb+') as file:\n        track.write_mp3_to(file)\n\n```\n\n## Asyncio Support\n```python\nfrom sclib.asyncio import SoundcloudAPI, Track\n\napi = SoundcloudAPI()\ntrack = await api.resolve('https://soundcloud.com/user/track')\n\nassert type(track) is Track\n\nfilename = f'{track.artist} - {track.title}.mp3'\n\nwith open(filename, 'wb+') as file:\n    await track.write_mp3_to(file)\n\n```\n\n## Fetch a playlist\n\n```python\nfrom sclib.asyncio import SoundcloudAPI, Track, Playlist\n\napi = SoundcloudAPI()\nplaylist = await api.resolve('https://soundcloud.com/playlist_url')\n\nassert type(playlist) is Playlist\n\nfor track in playlist.tracks:\n    filename = f'./{track.artist} - {track.title}.mp3'\n    with open(filename, 'wb+') as file:\n        await track.write_mp3_to(file)\n\n```\n\n## Write Album Name or Track Number\n```python\nfrom sclib import SoundcloudAPI, Track, Playlist\n\nplaylist = SoundcloudAPI().resolve(\"https://soundcloud.com/user/sets/playlist_name\")\n\nfor track_number, track in enumerate(playlist):\n    track.track_no = track_number\n    track.album = playlist.title\n    with open(f\"{track.artist} - {track.title}.mp3\", \"wb+\") as file:\n        track.write_mp3_to(file)\n```\n\n\n# Known Limitations\n\n### This library cannot download tracks that are not marked \"Downloadable\". \n\"Downloadable\" tracks have an MP3 representation while non-\"Downloadable\" ones only have HLS representations.  I would like to add HLS assembly to this library in the future.\n\n\n# Bugs or Features\nPlease report any and all bugs using the issues tab.\n\nFeel free to request new features too.\n\n\n# Contributing\nPlease feel free to submit a PR with your changes.\nPRs will only be accepted after a passing build.\nYou can make sure your changes pass the build stage by running `make lint` and `make test` locally without errors.  Code should be 10/10 quality for linting and all tests should pass.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3jackdaws%2Fsoundcloud-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3jackdaws%2Fsoundcloud-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3jackdaws%2Fsoundcloud-lib/lists"}