1.0.1 • Published 7 months ago
adanjz-jamendo v1.0.1
Music Downloader
A simple Node.js script to download instrumental jazz tracks from the Jamendo API.
Prerequisites
- Node.js
- A Jamendo API token (you can obtain one from Jamendo Developer Platform)
Setup
- Clone the repository:
git clone https://github.com/adanzweig/nodejs-jamendo.git
cd nodejs-jamendo
- Install required dependencies:
npm install dotenv
- Create a
.env
file in the root directory and set your Jamendo API token:
JAMENDO_TOKEN=your_api_token_here
Replace your_api_token_here
with your actual Jamendo API token.
Usage
Run the script:
node index.js
The script will search for an instrumental jazz track on Jamendo and download it as output.mp3
in the current directory.
Features
- Retrieves JSON data from the Jamendo API to get track details.
- Downloads tracks with error handling to ensure successful downloads.
- Uses
https
module for API requests and file downloading. - Uses
fs
module for file stream handling.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.