music change api
This commit is contained in:
parent
7c9058bb47
commit
2ef53a8d25
3 changed files with 9 additions and 6 deletions
|
@ -5,3 +5,5 @@ APIURL = 'http://127.0.0.1:5700/'
|
||||||
AUTHORIZATION = ''
|
AUTHORIZATION = ''
|
||||||
|
|
||||||
PORT = 5580
|
PORT = 5580
|
||||||
|
|
||||||
|
|
||||||
|
|
5
main.py
5
main.py
|
@ -9,6 +9,5 @@ def whenmsg():
|
||||||
ZZRouter(request.get_json())
|
ZZRouter(request.get_json())
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
app.run(host='0.0.0.0', port=PORT)
|
app.run(host='0.0.0.0',debug=True)
|
||||||
if __name__ == '__main__':
|
|
||||||
app.run()
|
|
||||||
|
|
|
@ -6,10 +6,12 @@ class Ans(StdAns):
|
||||||
if len(self.parms) < 2:
|
if len(self.parms) < 2:
|
||||||
return '不加参数是坏文明!'
|
return '不加参数是坏文明!'
|
||||||
|
|
||||||
url = 'http://47.100.45.234/search'
|
url = 'https://api.imjad.cn/cloudmusic/'
|
||||||
params = {
|
params = {
|
||||||
'keywords':self.raw_msg['message'][6:],
|
'type': 'search',
|
||||||
|
'search_type': 1,
|
||||||
'limit': 1,
|
'limit': 1,
|
||||||
|
's':self.raw_msg['message'][6:],
|
||||||
}
|
}
|
||||||
try:
|
try:
|
||||||
resp = requests.get(url=url,params=params).json()
|
resp = requests.get(url=url,params=params).json()
|
||||||
|
|
Loading…
Reference in a new issue