复活百度 MP3 下载机器人脚本

[撰文/albert748]

以前的那些 MP3 下载脚本已经早就不能用了,看着百度 MP3 的歌曲目录眼馋得很,又懒得去一个一个下载。虽然我看不懂 JS,不过没有关系,借助前辈们的代码,做一些换血,重新复活这个脚本。在此感谢他们!

这个脚本使用 Python+shell 实现。shell 脚本是专门用来解密百度 MP3 链接的,Python 是下载管理。

  1. 删除了下载函数,我觉得不太稳定,改为调用 wget 下载。
  2. 修改了 Python 获得真实链接的方式,改为获取 shell 的输出。
  3. 使用 mid3iconv 工具一步到位转换编码,不然 Linux 下又要乱码满屏飞了。

需要安装 mid3iconv 和 wget:

sudo apt-get install python-mutagen wget

如果以后有空的话,再写一个 GUI 吧。

Baidu MP3 下载脚本

Read More:

12 Comments

  1. 1 volans Commented @ 2009-03-04 11:50Reply to this comment

    现在baidu的还能下载么?前一阵子我想试听全都是404

  2. 2 venhow Commented @ 2009-03-04 11:57Reply to this comment

    好像百度的歌曲现在都是翻唱来的。。。

  3. 3 PT Commented @ 2009-03-04 12:24Reply to this comment

    我一直是无损党,一直是0day党...... 质量比百度的不知道好多少倍

  4. 4 Eidolon Commented @ 2009-03-04 13:07Reply to this comment

    PT: 不管无损不无损,PC上的音乐,最终还是要看播放设备的。 没有专业的设备,无损格式听起来照样好不到哪里去。

  5. 5 chinalinuxzend Commented @ 2009-03-04 13:26Reply to this comment

    @venhow:

    百度自己哪有歌曲,现在仍然是链接到其他网站啊

  6. 6 walter Commented @ 2009-03-04 14:49Reply to this comment

    偶也是无损党,

  7. 7 oldherl Commented @ 2009-03-04 16:00Reply to this comment

    谁来写一个直接听的脚本吧,我的硬盘太小,不想下载…… 或者听完以后立刻删除也好

  8. 8 tdsparrow Commented @ 2009-03-04 16:24Reply to this comment

    @oldherl: 直接听为什么要去baidu,我已经很长时间不下了,1g1g,yobo,8box,kedou都是不错的选择。

  9. 9 kent Commented @ 2009-03-04 16:41Reply to this comment

    一直是国外IP不能访问,改了?

  10. 10 albert748 Commented @ 2009-03-04 18:31Reply to this comment

    翻墙吧,gappproxy

  11. 11 eagle Commented @ 2009-03-04 18:44Reply to this comment

    百×的mp3是就来存硬盘的?

  12. 12 someone Commented @ 2009-03-05 0:39Reply to this comment

    用google.cn/music吧,正版的