示例#1
0
def add_song(name, list):
    startTime = time.time()
    ytb = Youtube()
    print("ytb " + str(time.time() - startTime))
    url = ytb.get_one(name)
    print("url " + str(time.time() - startTime))
    pafy = ytb.get_audio(url)
    print("pafy " + str(time.time() - startTime))
    list.add(pafy)
    print("list " + str(time.time() - startTime))
示例#2
0
def play_after_this_one(name, list):
    ytb = Youtube()
    url = ytb.get_one(name)
    pafy = ytb.get_audio(url)
    list.add(pafy)