No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
sigma67 3f186d4e00
Add option to pass raw headers to setup() (in place of terminal input)
Based on this change, coverage now runs without user input
2020-05-19 15:49:55 +02:00
.github/workflows Move docsbuild.yml to workflows folder 2020-05-05 14:50:11 +03:00
docs Fix RST inline code formatting 2020-05-15 20:59:01 +02:00
tests Add option to pass raw headers to setup() (in place of terminal input) 2020-05-19 15:49:55 +02:00
ytmusicapi Add option to pass raw headers to setup() (in place of terminal input) 2020-05-19 15:49:55 +02:00
.flake8 Implement pre-commit hooks 2020-05-12 14:01:58 +03:00
.gitignore Add more tests 2020-05-18 17:53:17 +02:00
.pre-commit-config.yaml Implement pre-commit hooks 2020-05-12 14:01:58 +03:00
.style.yapf Implement pre-commit hooks 2020-05-12 14:01:58 +03:00
CONTRIBUTING.rst Add more tests 2020-05-18 17:53:17 +02:00
headers_auth.json.example Simplify setup -> only cookie required 2020-04-15 00:44:08 +02:00
LICENSE Create LICENSE 2020-02-29 22:33:36 +01:00
MANIFEST.in Initial commit 2020-02-18 22:36:45 +01:00
README.rst Update README.rst 2020-05-18 16:43:23 +02:00
setup.py Add dev dependencies and CONTRIBUTING.rst (#3) 2020-05-15 20:51:11 +02:00

ytmusicapi: Unofficial API for YouTube Music
############################################

.. image:: https://img.shields.io/pypi/dm/ytmusicapi?style=flat-square
    :alt: PyPI Downloads
    :target: https://pypi.org/project/ytmusicapi/

.. image:: https://raw.githubusercontent.com/sigma67/ytmusicapi/master/tests/coverage.svg
    :alt: Code coverage
    :target: https://github.com/dbrgn/coverage-badge

.. image:: https://img.shields.io/github/v/release/sigma67/ytmusicapi?style=flat-square
    :alt: Latest release
    :target: https://github.com/sigma67/ytmusicapi/releases/latest

.. image:: https://img.shields.io/github/commits-since/sigma67/ytmusicapi/latest?style=flat-square
    :alt: Commits since latest release
    :target: https://github.com/sigma67/ytmusicapi/commits


A work-in-progress API that emulates web requests from the YouTube Music web client.

Currently you need to extract your authentication data from your web browser and provide it through a file for it to work.

.. features

Features
--------
| **Browsing**:

* get artist information and releases (songs, videos, albums, singles)
* get albums
* search (including all filters)

| **Library management**:

* get library contents: playlists, songs, artists, albums and subscriptions
* add/remove library content: rate songs, albums and playlists, subscribe/unsubscribe artists

| **Playlists**:

* create, delete, and modify playlists
* get playlist contents, add/remove tracks

| **Uploads**:

* Upload songs and remove them again
* List uploaded songs, artists and albums


Usage
------
.. code-block:: python

    from ytmusicapi import YTMusic

    ytmusic = YTMusic('headers_auth.json')
    playlistId = ytmusic.create_playlist("test", "test description")
    search_results = ytmusic.search("Oasis Wonderwall")
    ytmusic.add_playlist_items(playlistId, [search_results[0]['videoId']])

The `tests <https://github.com/sigma67/ytmusicapi/blob/master/tests/test.py>`_ are also a great source of usage examples.

.. end-features

Requirements
==============

- Python 3.5 or higher - https://www.python.org

Setup and Usage
===============

See the `Documentation <https://ytmusicapi.readthedocs.io/en/latest/usage.html>`_ for detailed instructions

Contributing
==============

Pull requests are welcome. There are still some features that are not yet implemented.
Please, refer to `CONTRIBUTING.rst <https://github.com/sigma67/ytmusicapi/blob/master/CONTRIBUTING.rst>`_ for guidance.