Python API for downloading Melon charts
Project description
melon-chart.py
melon-chart.py is a Python API that retrieves the TOP 100 information from the Melon.
Installation
pip install melon-chart.py
Quickstart
The main usage of melon-chart.py is similar to billboard.py.
>>> from melon import *
>>> chart = ChartData(image_size=500)
>>> print(chart[0].json())
{
"artist": "IVE (아이브)",
"image": "https://cdnimg.melon.co.kr/cm2/album/images/112/11/297/11211297_20230327114349_500.jpg?7d9408105554f2f425c3d1d43ddd3d9f/melon/resize/500/optimize/90",
"isNew": false,
"lastPos": 1,
"rank": 1,
"title": "Kitsch"
}
>>> print(chart.name)
멜론차트_TOP100NOW
>>> print(chart.date)
2023-04-09 20:00:00
ChartData Arguments
imageSize
– The size of cover image for the track. (default: 256)fetch
– A boolean value that indicates whether to retrieve the chart data immediately. If set toFalse
, you can fetch the data later using thefetchEntries()
method.
Chart entry attributes
ChartEntry
can be accessed using the ChartData[index]
syntax. A ChartEntry
instance has the following attributes:
title
– The title of the trackartist
– The name of the artistimage
– The URL of the cover image for the tracklastPos
- The track's last position on the previous period.rank
– The track's current rank position on the chart.isNew
– Whether the track is new to the chart.
Dependencies
License
This project is licensed under the MIT License.
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
melon-chart.py-1.0.0.tar.gz
(4.1 kB
view details)
Built Distribution
File details
Details for the file melon-chart.py-1.0.0.tar.gz
.
File metadata
- Download URL: melon-chart.py-1.0.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd8339461980434c478910140c523b7bcf218e4caa7dbfa00d5d2ee82d6e0e03 |
|
MD5 | 07d840ca6da0ba1edd64a0a1b018da84 |
|
BLAKE2b-256 | 22143282372b81def243cc7313e429e385d937442d9c47c113b7ee75d256b4a6 |
File details
Details for the file melon_chart.py-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: melon_chart.py-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f28b846a4d037228d5e372ec175f1d542a07406c0dad565aa32aad80ce4612f7 |
|
MD5 | c90d11649aa8b3c41344a4078a667828 |
|
BLAKE2b-256 | 032ad65215ef9cfd727dca5b6c1ace9e68eb808225b7285dcbe22e83a3aa769b |