📜  pafy python 文档 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:09.631000             🧑  作者: Mango

代码示例1
import pafy

# callback function, this callback simply prints the bytes received,
# ratio downloaded and eta.
def mycb(total, recvd, ratio, rate, eta):
    print(recvd, ratio, eta)

p = pafy.new("cyMHZVT91Dw")
ba = p.getbestaudio()
filename = ba.download(quiet=True, callback=mycb)