小编run*_*neh的帖子

如何使用python捕获mp3流

捕获来自http的mp3流并使用python将其保存到磁盘的最佳方法是什么?

到目前为止,我已经尝试过

target = open(target_path, "w")
conn = urllib.urlopen(stream_url)
while True:
    target.write(conn.read(buf_size))
Run Code Online (Sandbox Code Playgroud)

这给了我数据,但它的乱码或不会在MP3播放器中播放.

python streaming

11
推荐指数
1
解决办法
4608
查看次数

标签 统计

python ×1

streaming ×1