No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nikola Forró c86d4de662 Always try to obtain setVideoId of playlist items
Collaborative playlists allow collaborators to remove items,
so the items have setVideoId assigned, but the playlists themselves
do not appear editable - they are not owned.

Make it so that attempt to obtain setVideoId is performed also in such
cases.

Signed-off-by: Nikola Forró <nforro@redhat.com>
2020-05-18 18:47:14 +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 Update coverage instructions and badge 2020-05-18 16:42:03 +02:00
ytmusicapi Always try to obtain setVideoId of playlist items 2020-05-18 18:47:14 +02:00
.flake8 Implement pre-commit hooks 2020-05-12 14:01:58 +03:00
.gitignore Add .vscode to .gitignore 2020-05-03 21:35:26 +03: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 Fix RST inline code formatting 2020-05-15 20:59:01 +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.