melon-chart.py is a Python API that retrieves the TOP 100 information from the Melon
국내 음원차트 멜론 실시간 TOP 100 차트를 불러오는 API입니다.
pip install melon-chart.py
The main usage of melon-chart.py is similar to billboard.py.
>>> from melon import *
>>> chart = ChartData(imageSize=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
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.
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.
- Melon | melon-chart.py
- Bugs | bugs-chart.py
- Genie | genie-chart.py
- Vibe | vibe-chart.py
- Flo | flo-chart.py
This project is licensed under the MIT License.