import sys
import you_get
from multiprocessing import Pool
#url ='你要下载的视频链接'
#path='你要把视频保存到哪里'
url = 'https://www.bilibili.com/bangumi/play/ep317937?bsource=baidu_aladdin'
path = '/Users/momo/Desktop'
total=14
def down1():
start_url = url
path1 = path
for i in range(1, 3, 1):
url1 = start_url + str(i)
download(url1, path1)
def down2():
start_url = url
path1 = path
for i in range(3, 5, 1):
url1 = start_url + str(i)
download(url1, path1)
def down3():
start_url = url
path1 = path
for i in range(5, 7, 1):
url1 = start_url + str(i)
download(url1, path1)
def down4():
start_url = url
path1 = path
for i in range(7, 9, 1):
url1 = start_url + str(i)
download(url1, path1)
def down5():
start_url = url
path1 = path
for i in range(9, 11, 1):
url1 = start_url + str(i)
download(url1, path1)
def down6():
start_url = url
path1 = path
for i in range(11, 13, 1):
url1 = start_url + str(i)
download(url1, path1)
def down7():
start_url = url
path1 = path
for i in range(13, 15, 1):
url1 = start_url + str(i)
download(url1, path1)
def down8():
start_url = url
path1 = path
for i in range(35, 40, 1):
url1 = start_url + str(i)
download(url1, path1)
def download(url, path):
sys.argv = ['you-get', '-o', path, url]
you_get.main()
def main():
po = Pool(8)
po.apply_async(down1)
po.apply_async(down2)
po.apply_async(down3)
po.apply_async(down4)
po.apply_async(down5)
po.apply_async(down6)
po.apply_async(down7)
po.apply_async(down8)
po.close()
po.join()
if __name__ == '__main__':
main()
我用的是mac,现在视频播放不成功,想问下这是代码的问题还是视频转换的问题,正确的做法该怎么办才好