An unofficial YouTube Music API For Python Programming Language.
Project description
YouTubeMusicAPI
What's new in version 2.4?
- Stable release.
- New searchUrls() function added.
About
- An unofficial YouTube Music API For Python Programming Language.
- A Python library which Quickly gather the metadata of a Song, Playlist existing on YouTube or YouTube Music.
- No Access token or Credentials required.
Package Installation
- Windows
pip install --upgrade YouTubeMusicAPI==2.4
- Linux & Mac OS
pip3 install --upgrade YouTubeMusicAPI==2.4
GET Basic
- track()
This function can be used to get metadata of a track or song.
from YouTubeMusicAPI import YouTubeMusicAPI
track = YouTubeMusicAPI().track("immortals")
print(track)
# output
{
'name': 'Fall Out Boy - Immortals (Official Music Video) (From "Big Hero 6")',
'datePublished': '2014-10-13',
'Id': 'l9PxOanFjxQ',
'url': 'https://music.youtube.com/watch?v=l9PxOanFjxQ',
'image': 'https://i.ytimg.com/vi/l9PxOanFjxQ/hqdefault.jpg'
}
- playlist()
This function can be used to get metadata of a playlist.
from YouTubeMusicAPI import YouTubeMusicAPI
playlist = YouTubeMusicAPI().playlist("Alan Walker")
print(playlist)
# output
{
'name': 'Alan Walker - Teledyski',
'url': 'https://music.youtube.com/playlist?list=PLwcXu6NozQZjVjazNF0fqbdQ8e15mnMJ4',
'Id': 'PLwcXu6NozQZjVjazNF0fqbdQ8e15mnMJ4'
}
- searchUrls()
This function can be used to get all result urls based on query.
from YouTubeMusicAPI import YouTubeMusicAPI
urls = YouTubeMusicAPI().searchUrls("alone")
print(urls)
#output
[
'https://music.youtube.com/watch?v=bPs0xFd4skY',
'https://music.youtube.com/watch?v=TCFuCCY-pxc',
'https://music.youtube.com/watch?v=ciwx8yJPX54',
'https://music.youtube.com/watch?v=aZwklvDdaVw',
'https://music.youtube.com/watch?v=ALZHF5UqnU4',
'https://music.youtube.com/watch?v=KDzL80906Xo',
'https://music.youtube.com/watch?v=HhjHYkPQ8F0'
]
Author
License
Contributing
- For major changes or improvement, Open an issue and mention what you would like to change or add.
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
YouTubeMusicAPI-2.4.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for YouTubeMusicAPI-2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65b65ab4a678ccaa73981edb6ec524481578d7b5940fd0a7bcd31a4e1564671e |
|
MD5 | 124c83b65529372fbafc5b77c1467f7c |
|
BLAKE2b-256 | e7b994578326bdf58df392f8f10bcf3596300ffa7d2f9f00e504195982f25ed5 |