Ejemplo n.º 1
0
def giveInfo(v):
	link= v.url
	ress= mt.getAllStreams(link)
	audio_streams=[]
	for r_stream in ress:
		if(r_stream.type=='audio'):
			audio_streams.append(r_stream)
	r= audio_streams[0]
	size= getSize(r.filesize)
	return size, str(size)+"MB"
Ejemplo n.º 2
0
def download(v):
    link = v.url
    ress = mt.getAllStreams(link)
    audio_streams = []
    for r_stream in ress:
        if (r_stream.type == 'video'):
            audio_streams.append(r_stream)
    r = audio_streams[0]
    mt.downloadV(r)
    fpath = str(os.path.join('Videos', safe_filename(
        v.title))) + '.' + r.subtype
    playVideo(v.title, fpath)
Ejemplo n.º 3
0
def download(v):
	link= v.url
	ress= mt.getAllStreams(link)
	audio_streams=[]
	for r_stream in ress:
		if(r_stream.type=='audio'):
			audio_streams.append(r_stream)
	r= audio_streams[0]
	mt.downloadM(r)
	fpath= str(os.path.join('Files/Musics',safe_filename(v.title)))+'.'+r.subtype
	#playSong(v.title, fpath)
	return fpath
Ejemplo n.º 4
0
for i in range(len(videos)):
	print('(',(i+1),') [',videos[i].duration,'] ',videos[i].title)

line()
indexText= input("Enter Video index:- ")
line()
index= int(indexText)
index-=1

v= videos[index]
print("Downloading ",v.title)
line()

link= v.url

ress= mt.getAllStreams(link)

# for r in ress:
#     print(r.mime_type)
#     print(r.resolution)
#     print(r.type)

print('Available type and resolution')
line()

types= set()
for r in ress:
    types.add(r.type)

for type in types:
    print(type)