Code Monkey home page Code Monkey logo

qqmusicapi's Introduction

Hi there 👋

Metrics

About me

平常写写代码、打打游戏、摸摸鱼
偶尔看看小说

严重拖延症患者
不想做作业

Programming Languages

qqmusicapi's People

Contributors

luren-dc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

qqmusicapi's Issues

Unclosed client session

#!/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 吗?

我在获取歌曲下载链接的时候获取的内容一直为空

import asyncio

from qqmusic_api import search,song,Credential

Song(mid=001Bbywq2gicae, id=102065750)

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': ''},是否功能失效

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.