forked from chen310/NeteaseCloudMusicTasks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
517 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import random | ||
|
||
|
||
def start(user, task={}): | ||
music = user.music | ||
name = random.choice(task['name']) | ||
create_resp = music.playlist_create(name, 0, 'SHARED') | ||
if create_resp['code'] == 200: | ||
if task['delete'] == True: | ||
music.playlist_delete( | ||
[create_resp.get('id', 0)]) | ||
user.taskInfo(task['taskName'], '歌单创建成功,已删除') | ||
else: | ||
user.taskInfo(task['taskName'], '歌单创建成功') | ||
else: | ||
user.taskInfo(task['taskName'], user.errMsg(create_resp)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
def start(user, task={}): | ||
music = user.music | ||
|
||
resp = music.user_access() | ||
if resp['code'] == 200: | ||
user.taskInfo(task['taskName'], '登录成功') | ||
else: | ||
user.taskInfo(task['taskName'], user.errMsg(resp)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import random | ||
|
||
|
||
def start(user, task={}): | ||
music = user.music | ||
|
||
if len(task['id']) > 0 and len(user.comments) == 0: | ||
songId = random.choice(task['id']) | ||
if len(task['msg']) > 0: | ||
msg = random.choice(task['msg']) | ||
else: | ||
msg = '感谢大家收听' | ||
|
||
resp = music.comments_add(songId, msg) | ||
if resp['code'] == 200: | ||
user.comments.append( | ||
{'commentId': resp['comment']['commentId'], 'songId': songId}) | ||
user.taskInfo(task['taskName'], '发布成功') | ||
else: | ||
user.taskInfo(task['taskName'], user.errMsg(resp)) |
Oops, something went wrong.