QQ音乐导出

qcopy

QQ音乐好的不学,专门什么恶心难用学什么,以前想导出文件直接从目录下拷贝出来就行了,现在却变得蛋疼的和iTunes一样,加个目录,在创建无数个目录,在下面放文件!

你妹啊:

qqmusic

以前直接把iMusic导出就行了,现在也能导出,但是要自己复制文件,为了简单直接写个程序来处理,将文件复制到到电脑上,将下面的代码保存为.py(需要安装python),然后运行即可。

import os
import glob
import shutil
import sys

def Print_Usage():
    print("##############################################")
    print("QQMusic mp3 file copyer for iPhone")
    print("Mars Information Security")
    print("By:obaby QQ:289090351")
    print("http://www.h4ck.org.cn")
    print("##############################################")

def cur_file_dir():
    path = sys.path[0]
    if os.path.isdir(path):
        return path
    elif os.path.isfile(path):
        return os.path.dirname(path)

def Copy_mp3_file(sourcepath,destpath):
    for root, dirs, files in os.walk(sourcepath):
        for filename in files:
            path=os.path.join(root,filename)
            try:
                shutil.copyfile(path,'%s/%s'%(destpath,filename.replace('.tm3','.mp3')))
            except IOError:
                print '[ERROR]:File copy failed :'+filename
            else:
                print "[MSG]:File copyed: " + '%s/%s'%(destpath,filename.replace('.tm3','.mp3'))

    
if __name__=="__main__":
    Print_Usage()
    print("Plz input the iMusic floder path:")
    sourcedir = raw_input()
    if sourcedir.strip()=='':
	sourcedir =os.path.join( cur_file_dir(),"iMusic")
	print ("[MSG]:Use default:",(sourcedir))
    print("Plz input the target floder path:")
    target_dir = raw_input()
    if target_dir.strip()=='':
	target_dir = os.path.join(cur_file_dir(),"Dest")
	print ("[MSG]:Use default:",(target_dir))
    #print(sourcedir)
    if os.path.exists(sourcedir):
        if not os.path.exists(target_dir):
            os.mkdir(target_dir)
        Copy_mp3_file(sourcedir,target_dir)
    else:
        print("[ERROR]:Plz checke the input! Exit NOw!!!!!\n")
    print("[MSG]:All done!\n")
    print("##############################################\n")

输入源目录(iMusic目录),和目标文件夹路径(复制到的文件夹)。和开始的图一样即可。

然后用mp3tag修改文件名,现在就可以了,蛋疼的tx

convert

☆版权☆

* 网站名称:obaby@mars
* 网址:https://h4ck.org.cn/
* 个性:https://oba.by/
* 本文标题: 《QQ音乐导出》
* 本文链接:https://h4ck.org.cn/2013/10/5376
* 短链接:https://oba.by/?p=5376
* 转载文章请标明文章来源,原文标题以及原文链接。请遵从 《署名-非商业性使用-相同方式共享 2.5 中国大陆 (CC BY-NC-SA 2.5 CN) 》许可协议。


猜你喜欢:

2 comments

  1. Level 1
    Google Chrome 24 Google Chrome 24 Windows 7 Windows 7 cn广东省佛山市 电信

    其实把那个目录复制出来,然后目录右上使用Win7的搜索(XP也可以用自带的),输入「*.mp3」这样的就会全部列出来了,再复制到其他的地方就好,会比较方便。

    1. 公主 Queen 
      Opera 12 Opera 12 Windows 7 Windows 7 cn山东省青岛市 联通

      扩展名叫tm3,反正真么都得折腾下,然后也是要用到ren命令重命名,怎么也得折腾,无所谓了。

回复 obaby 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注