Update docs (closes #7)
This commit is contained in:
parent
83e886b337
commit
fadba30274
8 changed files with 129 additions and 104 deletions
|
|
@ -13,12 +13,11 @@
|
|||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.path.abspath('.'))
|
||||
sys.path.insert(0, '../..')
|
||||
from ytmusicapi import __version__ # noqa: E402
|
||||
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
|
||||
from ytmusicapi import __version__
|
||||
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'ytmusicapi'
|
||||
|
|
@ -51,7 +50,6 @@ templates_path = ['_templates']
|
|||
# This pattern also affects html_static_path and html_extra_path.
|
||||
exclude_patterns = []
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
|
|
@ -73,4 +71,4 @@ else:
|
|||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
html_static_path = ['_static']
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
ytmusicapi: Unofficial API for YouTube Music
|
||||
==================================================
|
||||
The purpose of this library is to automate interactions with `YouTube Music <https://music.youtube.com/>`_,
|
||||
such as retrieving your library content or creating large playlists.
|
||||
such as retrieving your library content, managing playlists and uploading songs.
|
||||
To achieve this, it emulates web requests that would occur if you performed the same actions in your web browser.
|
||||
|
||||
**This project is not supported nor endorsed by Google**
|
||||
|
||||
|
|
@ -14,7 +15,9 @@ such as retrieving your library content or creating large playlists.
|
|||
:start-after: features
|
||||
:end-before: end-features
|
||||
|
||||
For a complete documentation of available functions, refer to the :doc:`Reference <reference>`
|
||||
To **get started**, read the :doc:`setup instructions <setup>`.
|
||||
|
||||
For a **complete documentation** of available functions, see the :doc:`Reference <reference>`.
|
||||
|
||||
Contents
|
||||
--------
|
||||
|
|
|
|||
|
|
@ -17,8 +17,13 @@ To do so, follow these steps:
|
|||
- Go to the developer tools (Ctrl-Shift-I) and find an authenticated POST request. You can filter for /browse to easily find a suitable request.
|
||||
- Copy the request headers (right click > copy > copy request headers)
|
||||
|
||||
Now call :py:func:`YTMusic.setup()` and paste the request headers and it will create configuration file
|
||||
in the correct format in the current directory.
|
||||
Now call :py:func:`YTMusic.setup` with the parameter ``filepath=headers_auth.json`` and paste the request headers to the terminal input.
|
||||
If you don't want terminal interaction you can pass the request headers with the ``headers_raw`` parameter.
|
||||
|
||||
The function returns a JSON string with the credentials needed for :doc:`Usage <usage>`. Alternatively, if you passed the filepath parameter as described above,
|
||||
a file called ``headers_auth.json`` will be created in the current directory, which you can pass to ``YTMusic()`` for authentication.
|
||||
|
||||
These credentials remain valid as long as your YTMusic browser session is valid (about 2 years unless you log out).
|
||||
|
||||
Manual file creation
|
||||
--------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue