Files
songbox/example.py
ポキ ed9f33e71f feat(music): add song download functionality and rename client class
- Implement download_song method in MusicClient with progress tracking
- Rename songboxClient to SongboxClient for consistency
- Update documentation and examples to reflect class name change
- Add download command to CLI interface
2025-06-07 06:16:23 -07:00

14 lines
441 B
Python

from songbox import SongboxClient
client = SongboxClient()
verify_id = client.auth.login("960", "777777")
otp_code = input("Enter OTP: ")
token = client.auth.verify_otp(otp_code, verify_id)
print(f"Your Token is: {token}")
client.set_token(token)
song = client.music.get_song(6200)
file_path = client.music.download_song(song['url_original'])
print(f"\nDownload completed successfully!")
print(f"File saved to: {file_path}")
client.close()