music-helper | v2.0.4
Installation
pip install music-helper
Usage
from musichelper import MusicHelper
import asyncio
SoundCloud_DATA = (
"CLIENT_ID",
"AUTH_TOKEN"
)
DEEZER_ARL = "change this"
YTM_OAUTH_PATH = "./ytm_oauth.json"
async def main():
music_api = MusicHelper(deezer_arl=DEEZER_ARL,
ytm_oauth='',
debug=True)
# Deezer (Search & Download)
## Other methods can be found on the WIKI
data = await music_api.deezer.search_tracks('post malone rockstar', limit=1)
deezer_track = await music_api.deezer.get_track(data[0]['id'])
download_data = await music_api.deezer.download_track(deezer_track['info'],'./', with_lyrics=False, with_metadata=True)
print(download_data) # {'track': '.\\Post Malone - rockstar (feat. 21 Savage).mp3', 'lyric': None}
# SoundCloud (Search & Download)
search_data = await music_api.soundcloud.search('xxxtentacion ghetto christmas carol',limit=1)
# type(search_data) -> Generator
for track in search_data:
download_data = await music_api.soundcloud.download_track(track.id, './temp/')
print(download_data) # "./temp/A GHETTO CHRISTMAS CAROL Prod. RONNY J - XXXTENTACION.mp3"
# YouTube Music (Search & Download)
search_data = await music_api.ytm.search('masn - dont talk', filter='songs', limit=1)
track_tags = {
'videoId': search_data[0]['videoId'],
"artist": ', '.join(artist['name'] for artist in search_data[0]['artists']),
"title": search_data[0]['title'],
"album": search_data[0]['album']['name'] if 'album' in search_data[0] else " ",
"cover": search_data[0]['thumbnails'][-1]['url']
}
downlaod_data = await music_api.ytm.download_track(video_id = track_tags['videoId'],
download_path = './temp/', track_tags =track_tags)
print(downlaod_data) # "./temp/MASN - Don't Talk.mp3"
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Metadata
Release files for music-helper 2.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| music-helper-2.0.4.tar.gz | 16.5 kB | Without provenance | Details for music-helper-2.0.4.tar.gz |
Release files / music-helper-2.0.4.tar.gz
| Download URL | music-helper-2.0.4.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bfb00ebfa1f94835c6606f2bd99ae46acbabed108c134b7ed44757690c4efac6
|
|
BLAKE2b-256 checksum How to use checksums |
458a1caba6c91d2586901315211ea6af0af5c419d918571d78b696c4e42be389
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.0
|
Security for music-helper 2.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.