Skip to content

Python wrapper to download offline copy of Jiosaavn files using unofficial API

License

Notifications You must be signed in to change notification settings

rpakishore/JiosaavnDownloader

Repository files navigation

Jiosaavn Downloader

Download Jiosaavn mp3 from unofficial API


GitHub commit activity GitHub last commit

Table of Contents

1. About the Project

1.1. Features

  • Currently uses free saavn.me api endpoints, additional endpoints can easily be added.
  • Holds memory of previously downloaded files to prevent re-downloads.
  • Can handle individual songs and playlists
  • Can send download notifications through gotify

2. Getting Started

2.1. Prerequisites

python 3.11+

2.2. Installation

Clone repo and install with flit

  git clone https://github.com/rpakishore/JiosaavnDownloader.git
  cd JiosaavnDownloader
  pip install flit
  flit install --deps production

Alternatively, download the release and install with pip

  pip install jiosaavn-0.0.1-py2.py3-none-any.whl

3. Usage

Can be used as python package or through cli.

Copy config.example.toml to config.toml and edit accordingly

For cli, try

  app --help

For python package

#Initialize
from jiosaavn import JiosaavnDownload
from jiosaavn.API import SaavnMe

#Choose the database filepath & Final music location
saavn = JiosaavnDownload(cache_filepath='database.pkl', final_location='Y:\\Music')
#Choose downloader
saavn.set_downloader(downloader=SaavnMe())
#Can set Gotify Notifications; Can skip if not needed; Will prompt for API Key on first run.
saavn.GOTIFY_CHANNEL = "Media"
#Download song, skip if previously downloaded
saavn.song(url='https://www.jiosaavn.com/song/houdini/OgwhbhtDRwM', skip_downloaded=True)
#Download all songs in playlists
playlists = [
    '109815423',        #Top Kuthu - Tamil
    '799619460',        #Tamil EDM,
    '1134651042',       #Tamil: India Superhits Top 50
    '80802063',         #Tamil Viral Hits
    '109118539',        #Motivational Hits - Tamil
    '83412571',         #Workout Beats - Tamil
    '837803163',        #Chill Hits - Tamil,
    '696005328',        #House Party - Tamil
    '67691546',         #Semma Mass - Tamil
    '1134705865',       #Malayalam: India Superhits Top 50
]
for playlist in playlists:
    saavn.playlist(id=playlist)

4. Roadmap

  • Additional endpoints

5. License

See LICENSE.txt for more information.

6. Contact

Arun Kishore - @rpakishore

Project Link: https://github.com/rpakishore/JiosaavnDownloader

7. Acknowledgements

About

Python wrapper to download offline copy of Jiosaavn files using unofficial API

Resources

License

Stars

Watchers

Forks

Packages

No packages published