Files
songbox/examples/download_songs.py
ポキ 161a4d42d6 refactor(clients): reorganize client modules into clients package
- Move auth, user, and music clients into new clients package
- Update imports to use new module paths
- Add __init__.py to expose clients from package
- Clean up code formatting and imports
- Add pre-commit configuration for code quality checks
2025-06-07 06:57:01 -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()