Skip to content

Instantly share code, notes, and snippets.

@cosven
Last active October 28, 2020 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cosven/0923596c4792b97c61548b62a74c6fd1 to your computer and use it in GitHub Desktop.
Save cosven/0923596c4792b97c61548b62a74c6fd1 to your computer and use it in GitHub Desktop.
导出网易云音乐歌单到 fuo 文件
"""
Usage:
1. 在 FeelUOwn 中登录网易云
2. fuo exec < t.py
"""
from fuo_netease import provider
from fuocore.models.uri import reverse
from fuocore.cmds.helpers import show_song
user = provider._user
# for pl in user.playlists:
# print(reverse(pl))
def export_pl(pl):
with open(f'{pl.name}.fuo', 'w') as f:
songs_g = pl.create_songs_g()
for song in songs_g:
f.write(show_song(song, brief=True))
f.write('\n')
export_pl(user.playlists[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment