Skip to main content

GenieAPI

지니뮤직(genie.co.kr)의 비공식 Python API 래퍼입니다. 이 라이브러리를 사용하면 노래 검색, 실시간 차트 조회, 가사 추출, 그리고 노래 및 앨범의 상세 정보를 쉽게 가져올 수 있습니다.

주요 기능

  • 노래 검색: 검색어를 통해 노래 목록과 메타데이터를 조회합니다.
  • 실시간 차트: Top 200 실시간 차트 순위를 가져옵니다.
  • 노래 상세 정보: 곡의 장르, 재생 시간, 작사/작곡/편곡자 등 상세 정보를 조회합니다.
  • 앨범 상세 정보: 앨범의 아티스트, 발매일, 수록곡 목록(Tracklist) 등을 조회합니다.
  • 가사 추출: 타임스탬프가 포함된 가사 데이터를 가져옵니다.
  • 플레이리스트: 공개된 플레이리스트의 수록곡을 가져옵니다.

설치 방법

이 프로젝트는 Python 3.8 이상을 필요로 하며, 다음 라이브러리에 의존합니다:

pip install requests beautifulsoup4

사용 방법

from genieapi import GenieAPI

genie = GenieAPI()

# 1. 노래 검색
songs = genie.search_song("Ditto")
if songs:
    print(f"검색 결과: {songs[0].title} - {songs[0].artist}")

# 2. 실시간 Top 200 차트 조회
chart = genie.get_chart_top200()
for entry in chart[:5]:
    print(f"{entry.rank}위: {entry.song.title} - {entry.song.artist}")

# 3. 노래 상세 정보 조회
detail = genie.get_song_detail("99570005") # Ditto 의 ID
if detail:
    print(f"제목: {detail.title}, 재생시간: {detail.duration}")
    print(f"작사가: {detail.lyricist}")

# 4. 앨범 상세 정보 조회
album = genie.get_album_detail("83325577") # NewJeans 'OMG' 앨범 ID
if album:
    print(f"앨범명: {album.title}, 아티스트: {album.artist}, 발매일: {album.release_date}")
    print("수록곡 목록:")
    for track in album.tracklist:
        print(f" - {track.title}")

프로젝트 구조

  • genieapi/: 메인 패키지 디렉토리
    • GenieAPI.py: 네트워크 요청 및 API의 메인 엔트리 포인트
    • parsers.py: HTML 파싱 로직을 담당하는 순수 함수 모듈
    • models.py: 데이터 모델 (Song, Album, Lyric, ChartEntry)
    • Error.py: 사용자 정의 예외 클래스

주의사항

이 API는 공식적인 방법이 아닌 웹 스크래핑을 통해 동작하므로, 지니뮤직 사이트의 구조 변경에 따라 동작하지 않을 수 있습니다. 교육 및 연구 목적으로만 사용하시기 바라며, 과도한 요청은 자제해 주세요.

Metadata

Release files for GenieAPI 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for GenieAPI 0.1.4
File Size Uploaded Provenance Actions
genieapi-0.1.4.tar.gz 7.6 kB Without provenance Details for genieapi-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for GenieAPI 0.1.4
File Interpreter ABI Platform Actions
genieapi-0.1.4-py3-none-any.whl Python 3 none any Details for genieapi-0.1.4-py3-none-any.whl

Total release size: 16.5 kB

Release files / genieapi-0.1.4.tar.gz

Download URL genieapi-0.1.4.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6c07445cc8477a3b42fd7305165ded4a46512d8c34c25905221c7d123c6ce276
BLAKE2b-256 checksum
How to use checksums
9528e5971b2c5504cebd7ffcbd445c7ad96a30db8ed32ead0129a32f2ce6b2b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / genieapi-0.1.4-py3-none-any.whl

Download URL genieapi-0.1.4-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0da5a0a790f06a0c8503552c7f6aacb997718e0b92e38e12e03a26706b49130
BLAKE2b-256 checksum
How to use checksums
27658bf54423a0c61c35c5c7df304c8dde97c0c5d8910d45a5562481ff5fc0ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for GenieAPI 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page