A package to easily scrape music chart data from Melon and Bugs. Suitable for training lists and dictionaries.
Project description
MelonTop100
한국 음악 사이트(멜론, 벅스)의 차트 정보를 쉽게 가져올 수 있는 Python 패키지입니다.
get_songs() 함수를 사용하면 각 사이트의 인기 차트 곡 목록을 리스트 형태로 조회할 수 있으며, 각 항목은 곡명, 아티스트, 앨범 등의 정보를 담은 딕셔너리로 제공됩니다.
이 패키지는 Python 3.9 이상 버전을 지원합니다.
Setup(Dev)
개발자 환경 설정 및 테스트 실행 방법입니다.
$ uv sync
$ uv run pytest
$ uv run pytest --run-integration
$ uv run ruff check .
실제 음악 사이트에 직접 접근하여 크롤링 파싱 정상 작동 여부를 검증하려면 --run-integration 옵션을 붙여 통합 테스트를 실행해 주시기 바랍니다.
Use
$ pip install melon-top100
$ python
from melon_top100 import melon, bugs
# 멜론 Top 100
>>> melon.get_songs()
[{'song_no': '34754292', 'title': 'TOMBOY', 'album': 'I NEVER DIE', 'artist': '(여자)아이들'}, ...]
>>> melon.get_like_count(34754292)
{'34754292': 137492}
# 벅스 실시간 차트
>>> bugs.get_songs()
[{'track_id': '130013303', 'title': 'Adrenaline', 'artist': 'ATEEZ', 'album': 'GOLDEN HOUR : Part.4'}, ...]
Ruff
이 프로젝트는 린터와 포매터로 Ruff(https://docs.astral.sh/ruff/)를 사용합니다. Ruff는 Rust로 작성된 Python 린터/포매터로, 기존 도구(flake8, isort, black 등)를 대체하면서도 압도적으로 빠른 속도를 제공합니다.
타입 힌트에 대해서는 개인적으로 선호하는 편은 아니지만, Ruff가 타입 힌트를 기반으로 더 정밀한 분석과 자동 수정을 제공하는 방향으로 발전하고 있어 그 가능성에 대한 기대감으로 적용했습니다.
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file melon_top100-1.6.0.tar.gz.
File metadata
- Download URL: melon_top100-1.6.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd0c1d1e644d0bdad27b275e574779ed99d30fddcfd494dffbacde6b79f0996b
|
|
| MD5 |
745a0b873710a179fce8850c717f9544
|
|
| BLAKE2b-256 |
505278437d53e99cccfafb63d247b7d34414f8b24a106402d97267a09821a4da
|
File details
Details for the file melon_top100-1.6.0-py3-none-any.whl.
File metadata
- Download URL: melon_top100-1.6.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e8a10471c8a21ca48e5f14fde5feae7a4894fc7f7ad3f2e1662349c7b66c957
|
|
| MD5 |
b0f76075258e8054a3c5ea2a1bd3f430
|
|
| BLAKE2b-256 |
0a370715125f8ad2e7ede6abe0bf6f62717179d9683cbb276211187eba186d1d
|