平常写写代码、打打游戏、摸摸鱼
偶尔看看小说
严重拖延症患者
不想做作业
Python QQ音乐Api封装库
License: MIT License
#!/bin/env python3
import asyncio
from pyqqmusicapi import QQMusic
async def async_main():
# 初始化Api,可传入musicid,musickey
api = QQMusic()
# 可用api:SongApi,TopApi,SearchApi,MvApi,PlaylistApi,AlbumApi,LoginApi
result = await api.song.detail("0039MnYb0qxYhV")
song_name = result['track_info']['info']['name']
time_public = result['track_info']['info']['timePublic']
album_name = result['track_info']['album']['name']
print(f"{song_name}, album {album_name}, public {time_public}")
asyncio.run(async_main())
执行后返回错误
晴天, album 叶惠美, public 2003-07-31
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fa8c3175950>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7fa8c238c050>, 2580.640299335)]']
connector: <aiohttp.connector.TCPConnector object at 0x7fa8c3134f50>
我看 pyqqmusicapi/qqmusic.py
有定义 def __clean()
. 是我代码少了 close session 吗?
支持 QQ音乐 扫码登录
import asyncio
from qqmusic_api import search,song,Credential
async def main():
result = await song.query_by_mid(['001Bbywq2gicae'])
print("mid",result)
MUSICID = "1028.."
MUSICKEY = "Q_H_L_63k3N0dmy.."
credential = Credential(musicid=MUSICID, musickey=MUSICKEY)
result = await song.get_song_urls(mid=['001Bbywq2gicae'], credential=credential)
print(result)
if name == "main":
asyncio.run(main())
获取的内容为空{'001Bbywq2gicae': ''},是否功能失效
请问 order
是要求排序吗? 但是我看 api/album.py
中 param={"albumMid": mid, "order": 2, "begin": 0, "num": -1}
. 这里 order
为啥是 2 啊?
是否有main函数之类的调用演示
添加 Api 文档
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.