Unofficial YTMusic API
Project description
# ytmusicapi: Unofficial API for YouTube Music 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.
Note: I have not tested this with any account other than my own. Please let me know if it works for you.
## Requirements
Python 3 - https://www.python.org
## Setup
pip install git+https://github.com/sigma67/ytmusicapi
Authenticated requests
To run authenticated requests you need to copy your request headers from a POST request in your YTMusic Web Client. To do so, follow these steps: - Copy headers_auth.json.example to headers_auth.json - Open YTMusic in Firefox - Go to the developer tools (Ctrl-Shift-I) and right click a POST request. - Copy the request headers (right click > copy > copy request headers) - Paste the three missing items to headers_auth.json
## Usage Unauthenticated requests for retrieving playlist content or searching: ` from ytmusicapi import YTMusic ytmusic = YTMusic() `
Authenticated request to interact with your playlist (requires setting up your credentials in headers_auth.json): ` from ytmusicapi import YTMusic ytmusic = YTMusic('headers_auth.json') `
## Contributing Pull requests are welcome. There are still lots of features unimplemented, for example retrieving content from the library and other parts of YTMusic.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ytmusicapi-0.4.1.tar.gz
.
File metadata
- Download URL: ytmusicapi-0.4.1.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4af69630203278f53ff73fdbb51454dd6a80a5e1c74ae5b9bee190dba68d02bd |
|
MD5 | 4c5e04104354091b4e2885f8496c68e3 |
|
BLAKE2b-256 | 18c75c98a47b112768c677bde0faef0d9c76a34efdb1ef51d497065b795a7582 |
Provenance
File details
Details for the file ytmusicapi-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: ytmusicapi-0.4.1-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9fd8737adf457ed4a6d48d125380111f8f28bf510a5419238c5b4d029503230 |
|
MD5 | 5332cc3dadf1ce2581e189453fffdf29 |
|
BLAKE2b-256 | aa27982270de783870da68c8e8462bced6351a42f20ae2d852454ac4f1ed610b |