music change api
This commit is contained in:
parent
f8752efc05
commit
d398d360a6
3 changed files with 9 additions and 6 deletions
|
@ -4,4 +4,6 @@ APIURL = 'http://127.0.0.1:5700/'
|
|||
|
||||
AUTHORIZATION = ''
|
||||
|
||||
PORT = 5580
|
||||
PORT = 5580
|
||||
|
||||
|
||||
|
|
5
main.py
5
main.py
|
@ -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)
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue