mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-13 14:44:49 -04:00
Added README
This commit is contained in:
parent
d440e83263
commit
d5ef49c5c5
5 changed files with 128 additions and 155 deletions
160
.gitignore
vendored
160
.gitignore
vendored
|
@ -1,155 +1,5 @@
|
||||||
Qobuz Downloads
|
__pycache__
|
||||||
Downloads
|
*.egg-info
|
||||||
tests
|
secrets.py
|
||||||
*__pycache*
|
dist
|
||||||
.env
|
build
|
||||||
__pycache__/
|
|
||||||
*.py[cod]
|
|
||||||
*$py.class
|
|
||||||
.bumpversion.cfg
|
|
||||||
/*.py
|
|
||||||
!/setup.py
|
|
||||||
|
|
||||||
# C extensions
|
|
||||||
*.so
|
|
||||||
|
|
||||||
*.json
|
|
||||||
*.db
|
|
||||||
*.sh
|
|
||||||
|
|
||||||
|
|
||||||
# Distribution / packaging
|
|
||||||
.Python
|
|
||||||
build/
|
|
||||||
develop-eggs/
|
|
||||||
dist/
|
|
||||||
downloads/
|
|
||||||
eggs/
|
|
||||||
.eggs/
|
|
||||||
lib/
|
|
||||||
lib64/
|
|
||||||
parts/
|
|
||||||
sdist/
|
|
||||||
var/
|
|
||||||
wheels/
|
|
||||||
share/python-wheels/
|
|
||||||
*.egg-info/
|
|
||||||
.installed.cfg
|
|
||||||
*.egg
|
|
||||||
MANIFEST
|
|
||||||
|
|
||||||
# PyInstaller
|
|
||||||
# Usually these files are written by a python script from a template
|
|
||||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
||||||
*.manifest
|
|
||||||
*.spec
|
|
||||||
|
|
||||||
# Installer logs
|
|
||||||
pip-log.txt
|
|
||||||
pip-delete-this-directory.txt
|
|
||||||
|
|
||||||
# Unit test / coverage reports
|
|
||||||
htmlcov/
|
|
||||||
.tox/
|
|
||||||
.nox/
|
|
||||||
.coverage
|
|
||||||
.coverage.*
|
|
||||||
.cache
|
|
||||||
nosetests.xml
|
|
||||||
coverage.xml
|
|
||||||
*.cover
|
|
||||||
*.py,cover
|
|
||||||
.hypothesis/
|
|
||||||
.pytest_cache/
|
|
||||||
cover/
|
|
||||||
|
|
||||||
# Translations
|
|
||||||
*.mo
|
|
||||||
*.pot
|
|
||||||
|
|
||||||
# Django stuff:
|
|
||||||
*.log
|
|
||||||
local_settings.py
|
|
||||||
db.sqlite3
|
|
||||||
db.sqlite3-journal
|
|
||||||
|
|
||||||
# Flask stuff:
|
|
||||||
instance/
|
|
||||||
.webassets-cache
|
|
||||||
|
|
||||||
# Scrapy stuff:
|
|
||||||
.scrapy
|
|
||||||
|
|
||||||
# Sphinx documentation
|
|
||||||
docs/_build/
|
|
||||||
|
|
||||||
# PyBuilder
|
|
||||||
.pybuilder/
|
|
||||||
target/
|
|
||||||
|
|
||||||
# Jupyter Notebook
|
|
||||||
.ipynb_checkpoints
|
|
||||||
|
|
||||||
# IPython
|
|
||||||
profile_default/
|
|
||||||
ipython_config.py
|
|
||||||
|
|
||||||
# pyenv
|
|
||||||
# For a library or package, you might want to ignore these files since the code is
|
|
||||||
# intended to run in multiple environments; otherwise, check them in:
|
|
||||||
# .python-version
|
|
||||||
|
|
||||||
# pipenv
|
|
||||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
||||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
||||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
||||||
# install all needed dependencies.
|
|
||||||
#Pipfile.lock
|
|
||||||
|
|
||||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
||||||
__pypackages__/
|
|
||||||
|
|
||||||
# Celery stuff
|
|
||||||
celerybeat-schedule
|
|
||||||
celerybeat.pid
|
|
||||||
|
|
||||||
# SageMath parsed files
|
|
||||||
*.sage.py
|
|
||||||
|
|
||||||
# Environments
|
|
||||||
.env
|
|
||||||
.venv
|
|
||||||
env/
|
|
||||||
venv/
|
|
||||||
ENV/
|
|
||||||
env.bak/
|
|
||||||
venv.bak/
|
|
||||||
|
|
||||||
# Spyder project settings
|
|
||||||
.spyderproject
|
|
||||||
.spyproject
|
|
||||||
|
|
||||||
# Rope project settings
|
|
||||||
.ropeproject
|
|
||||||
|
|
||||||
# mkdocs documentation
|
|
||||||
/site
|
|
||||||
|
|
||||||
# mypy
|
|
||||||
.mypy_cache/
|
|
||||||
.dmypy.json
|
|
||||||
dmypy.json
|
|
||||||
|
|
||||||
# Pyre type checker
|
|
||||||
.pyre/
|
|
||||||
|
|
||||||
# pytype static type analyzer
|
|
||||||
.pytype/
|
|
||||||
|
|
||||||
# Cython debug symbols
|
|
||||||
cython_debug/
|
|
||||||
*.yaml
|
|
||||||
*.flac
|
|
||||||
*.m4a
|
|
||||||
*.ogg
|
|
||||||
*.mp3
|
|
||||||
|
|
80
README.md
Normal file
80
README.md
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
# streamrip
|
||||||
|
|
||||||
|
A scriptable stream downloader for Qobuz, Tidal, and Deezer.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip3 install streamrip
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Basic Usage
|
||||||
|
|
||||||
|
**For Tidal and Qobuz, you NEED a premium subscription.**
|
||||||
|
|
||||||
|
Download an album from Qobuz
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rip -u https://open.qobuz.com/album/0060253780968
|
||||||
|
```
|
||||||
|
|
||||||
|
Download the album and convert it to `mp3`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rip --convert mp3 -u https://open.qobuz.com/album/0060253780968
|
||||||
|
```
|
||||||
|
|
||||||
|
Search for *Fleetwood Mac - Rumours* on Qobuz
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rip search 'fleetwood mac rumours'
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Search for *Rumours* on Tidal, download it, convert it to `ALAC`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rip -c alac search 'fleetwood mac rumours'
|
||||||
|
```
|
||||||
|
|
||||||
|
Qobuz discographies can be filtered using the `filter` subcommand
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rip filter --repeats --features 'https://open.qobuz.com/artist/22195'
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Want to find some new music? Use the `discover` command (only on Qobuz)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rip discover --list 'best-sellers'
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
For more help and examples
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rip --help
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rip filter --help
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rip search --help
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rip discover --help
|
||||||
|
```
|
||||||
|
|
||||||
|
**This tool is still in development. If there are any features you would like to see, please open an issue.**
|
||||||
|
|
BIN
demo/interactive_search.png
Normal file
BIN
demo/interactive_search.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 349 KiB |
|
@ -1,4 +1,5 @@
|
||||||
import datetime
|
import datetime
|
||||||
|
import click
|
||||||
import hashlib
|
import hashlib
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
@ -122,6 +123,7 @@ class QobuzClient(ClientInterface):
|
||||||
:type pwd: str
|
:type pwd: str
|
||||||
:param kwargs: app_id: str, secrets: list, return_secrets: bool
|
:param kwargs: app_id: str, secrets: list, return_secrets: bool
|
||||||
"""
|
"""
|
||||||
|
click.secho(f"Logging into {self.source}", fg='green')
|
||||||
if self.logged_in:
|
if self.logged_in:
|
||||||
logger.debug("Already logged in")
|
logger.debug("Already logged in")
|
||||||
return
|
return
|
||||||
|
@ -421,6 +423,7 @@ class TidalClient(ClientInterface):
|
||||||
self.logged_in = False
|
self.logged_in = False
|
||||||
|
|
||||||
def login(self, email: str, pwd: str):
|
def login(self, email: str, pwd: str):
|
||||||
|
click.secho(f"Logging into {self.source}", fg='green')
|
||||||
if self.logged_in:
|
if self.logged_in:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
40
test.py
Normal file
40
test.py
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
import base64
|
||||||
|
import json
|
||||||
|
import logging
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
from pprint import pprint
|
||||||
|
|
||||||
|
# from music_dl.config import Config
|
||||||
|
# from music_dl.constants import URL_REGEX
|
||||||
|
from music_dl.cli import main
|
||||||
|
|
||||||
|
# from music_dl.core import MusicDL
|
||||||
|
|
||||||
|
# import requests
|
||||||
|
# from tqdm import tqdm
|
||||||
|
logger = logging.basicConfig(level=logging.DEBUG)
|
||||||
|
|
||||||
|
main()
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
client = TidalClient()
|
||||||
|
client.login(**config.creds(client.source))
|
||||||
|
# https://www.qobuz.com/us-en/label/rhino/download-streaming-albums/7425
|
||||||
|
# https://www.qobuz.com/us-en/album/chemtrails-over-the-country-club-lana-del-rey/dmm832vafkjdc
|
||||||
|
album = Album(id='dmm832vafkjdc', client=client)
|
||||||
|
album.load_meta()
|
||||||
|
album.download(embed_cover=True)
|
||||||
|
album.convert('ALAC')
|
||||||
|
"""
|
||||||
|
|
||||||
|
s = """
|
||||||
|
# converts everything
|
||||||
|
https://open.qobuz.com/album/
|
||||||
|
rumours tidal: 68714459
|
||||||
|
https://open.qobuz.com/album/uhy28719w8ybb
|
||||||
|
https://open.qobuz.com/playlist/5800943
|
||||||
|
https://open.qobuz.com/artist/11877118774
|
||||||
|
https://open.qobuz.com/track/19512574
|
||||||
|
"""
|
Loading…
Add table
Add a link
Reference in a new issue