### Install PyNCM Source: https://github.com/mos9527/pyncm/blob/master/README.md Install the PyNCM library using pip. Optional dependencies like 'mutagen' for metadata, 'tqdm' for progress bars, and 'coloredlogs' for colorful logs can also be installed. ```bash pip install pyncm ``` -------------------------------- ### Get Track Detail API Source: https://github.com/mos9527/pyncm/blob/master/README.md Python example using the PyNCM API to fetch detailed information about a track, identified by its ID. The returned data includes song name, ID, and other metadata. ```python from pyncm import apis apis.track.GetTrackDetail(29732235) ``` -------------------------------- ### PyNCM Multi-Session Example Source: https://github.com/mos9527/pyncm/blob/master/README.md Demonstrates how to manage multiple sessions in PyNCM for API calls. It shows creating a new session, using it within a 'with' block, and performing login and API calls within that specific session context. ```python session = CreateNewSession() # 建立新的 Session with session: # 进入该 Session, 在 `with` 内的 API 将由该 Session 完成 LoginViaCellPhone(...) result = GetTrackAudio(...) ``` -------------------------------- ### Get Track Audio API Source: https://github.com/mos9527/pyncm/blob/master/README.md Python example using the PyNCM API to retrieve audio information for a given track ID. The result includes data such as the track ID and its audio URL. ```python from pyncm import apis apis.track.GetTrackAudio(29732235) ``` -------------------------------- ### Anonymous Login for pyncm Source: https://github.com/mos9527/pyncm/blob/master/README.md Provides an example of how to perform an anonymous login using the LoginViaAnonymousAccount function from the pyncm.apis.login module. This is a workaround for situations where a user might not have a suitable account for login. ```python >>> from pyncm.apis.login import LoginViaAnonymousAccount >>> LoginViaAnonymousAccount() {'tick': 1662870122.1159196, 'content': {'code': 200, 'userId': 8023914528, 'createTime': 1662868134354, 'profile': {'nickname': 'Ano...'} ``` -------------------------------- ### Get Track Comments API Source: https://github.com/mos9527/pyncm/blob/master/README.md Python example using the PyNCM API to retrieve comments for a specific track ID. The response includes information about musicians, user IDs, hot comments, and whether more comments are available. ```python from pyncm import apis apis.track.GetTrackComments(29732235) ``` -------------------------------- ### PyNCM CLI Download Options Source: https://github.com/mos9527/pyncm/blob/master/README.md Command-line interface options for downloading music with PyNCM. Includes settings for download workers, output file naming templates, output directory, audio quality, using download API, skipping overwrites, and lyric download preferences. ```bash --max-workers MAX_WORKERS, -m MAX_WORKERS --output-name OUTPUT_NAME_TEMPLATE, --template OUTPUT_NAME_TEMPLATE, -t OUTPUT_NAME_TEMPLATE -o OUTPUT, --output OUTPUT --quality QUALITY -dl, --use-download-api --no-overwrite --lyric-no LYRIC_SKIP_TYPES ``` -------------------------------- ### PyNCM CLI Download Limits and Filtering Source: https://github.com/mos9527/pyncm/blob/master/README.md Command-line options for limiting and filtering downloads with PyNCM. Allows setting the total number of songs to download, sorting by hotness or time, reversing sort order, and downloading bookmarked playlists. ```bash -n COUNT, --count COUNT --sort-by SORT_KEY --reverse-sort --user-bookmarks ``` -------------------------------- ### PyNCM CLI Login Options Source: https://github.com/mos9527/pyncm/blob/master/README.md Command-line interface options for logging into NetEase Cloud Music accounts with PyNCM. Supports login via phone number, cookie, password, saving/loading login information, prioritizing HTTP, specifying device ID, and setting log level. ```bash --phone PHONE --cookie COOKIE --pwd PASSWORD, --password PASSWORD --save [SAVE_TO] --load [LOAD_FROM] --http --deviceId DEVICE_ID --log-level LOG_LEVEL ``` -------------------------------- ### PyNCM CLI Utility Options Source: https://github.com/mos9527/pyncm/blob/master/README.md Command-line utility options for PyNCM, including saving M3U playlists. This option saves the downloaded song filenames in order to an M3U file, encoded in UTF-8. ```bash --save-m3u SAVE_M3U_FILENAME ``` -------------------------------- ### Specify Session in API Call Source: https://github.com/mos9527/pyncm/blob/master/README.md Demonstrates how to specify a session when making an API call, such as GetTrackComments. This allows for continued API management by the global session after leaving a specific session. ```python await GetTrackComments(..., session=session) ``` -------------------------------- ### PyNCM Environment Variable Source: https://github.com/mos9527/pyncm/blob/master/README.md Environment variable for PyNCM to control debug logging output. Accepts values like 'CRITICAL', 'DEBUG', 'ERROR', 'FATAL', 'INFO', 'WARNING'. ```bash PYNCM_DEBUG ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.