24 lines
716 B
Python
24 lines
716 B
Python
import argparse
|
|
import json
|
|
|
|
from src.title import TitleCookie
|
|
from src import payload
|
|
|
|
def GetUserMusicApi(userId, musicId, cookie):
|
|
|
|
data = payload.GetUserMusic(userId, musicId)
|
|
|
|
res = TitleCookie(userId, "GetUserMusicApi", data, cookie)
|
|
|
|
return res
|
|
|
|
if __name__ == "__main__":
|
|
parser = argparse.ArgumentParser(description="Title GetUserMusicApi")
|
|
|
|
parser.add_argument("--userId", type=int, required=True, help="userId")
|
|
parser.add_argument("--musicId", type=int, required=True, help="musicId")
|
|
parser.add_argument("--cookie", type=str, required=True, help="cookie")
|
|
|
|
args = parser.parse_args()
|
|
print(GetUserMusicApi(args.userId, args.musicId, json.loads(args.cookie)))
|