music change api

This commit is contained in:
SiHuan 2020-03-16 15:42:57 +08:00
parent f8752efc05
commit d398d360a6
3 changed files with 9 additions and 6 deletions

View file

@ -4,4 +4,6 @@ APIURL = 'http://127.0.0.1:5700/'
AUTHORIZATION = ''
PORT = 5580
PORT = 5580

View file

@ -9,6 +9,5 @@ def whenmsg():
ZZRouter(request.get_json())
return ''
app.run(host='0.0.0.0', port=PORT)
if __name__ == '__main__':
app.run()
app.run(host='0.0.0.0',debug=True)

View file

@ -6,10 +6,12 @@ class Ans(StdAns):
if len(self.parms) < 2:
return '不加参数是坏文明!'
url = 'http://47.100.45.234/search'
url = 'https://api.imjad.cn/cloudmusic/'
params = {
'keywords':self.raw_msg['message'][6:],
'type': 'search',
'search_type': 1,
'limit': 1,
's':self.raw_msg['message'][6:],
}
try:
resp = requests.get(url=url,params=params).json()