def test():
    mp3_txt = file("mp3_name.txt", 'r')
    download_dict = dict()
    count=0
    for line in mp3_txt:
        count += 1
        if count > 63:
            break
        key, title, artist = line.split('\t')
    download_dict[int(key)] = (title, artist)
    t1= DistrubeThread(download_list)
    t1.start()
    time.sleep(10)
    t2 = DownThread(download_list)
    t2.start    
Exemple #2
0
def test():
    mp3_txt = file("mp3_name.txt", 'r')
    download_dict = dict()
    count = 0
    for line in mp3_txt:
        count += 1
        if count > 63:
            break
        key, title, artist = line.split('\t')
    download_dict[int(key)] = (title, artist)
    t1 = DistrubeThread(download_list)
    t1.start()
    time.sleep(10)
    t2 = DownThread(download_list)
    t2.start
def main():
    target_dir = os.getcwd()
##    target_dir = current_dir+r'\song'
##    if os.path.exists(target_dir):
##        pass
##    else:
##        os.mkdir(target_dir)
        
    download_dict = dict()
    GetDownloadList(download_dict, target_dir)

    t1= DistrubeThread(download_dict)
    t1.start()
    time.sleep(2)
    t2 = DownThread(download_dict, target_dir)
    t2.start()
Exemple #4
0
def main():
    target_dir = os.getcwd()
    ##    target_dir = current_dir+r'\song'
    ##    if os.path.exists(target_dir):
    ##        pass
    ##    else:
    ##        os.mkdir(target_dir)

    download_dict = dict()
    GetDownloadList(download_dict, target_dir)

    t1 = DistrubeThread(download_dict)
    t1.start()
    time.sleep(2)
    t2 = DownThread(download_dict, target_dir)
    t2.start()