小编Rob*_*ers的帖子

在 Python 3 中使用 Mutagen 将专辑封面嵌入到 mp3

ID3。这是 Python 3 API,我不知道如何嵌入图像,到目前为止,我在更​​改标签的地方有这个,

def addMetaData(url, title, artist, album, track):

    response = requests.get(url, stream=True)
    with open('img.jpg', 'wb') as out_file:
        shutil.copyfileobj(response.raw, out_file)
    del response

    audio = MP3(filename=title+".mp3", ID3 = EasyID3)
    audio['artist'] = artist
    audio['title'] = title
    audio['tracknumber'] = track
    audio['album'] = album

    audio.save()
Run Code Online (Sandbox Code Playgroud)

python mp3 mutagen python-3.x

3
推荐指数
2
解决办法
3649
查看次数

标签 统计

mp3 ×1

mutagen ×1

python ×1

python-3.x ×1