2016-10-26, 02:52
Hi everyone,
I just wanna say that I had some hard time with key errors and not knowing how to retrieve titles and thumbnails, but now I found it. So for those interested here they are:
I just wanna say that I had some hard time with key errors and not knowing how to retrieve titles and thumbnails, but now I found it. So for those interested here they are:
Code:
import YDStreamExtractor
YDStreamExtractor.disableDASHVideo(True) #Kodi.log says its deprecated!
Code:
url = "http://www.youtube.com/watch?v=_yVv9dx88x0" #a youtube ID will work as well and of course you could pass the url of another site
vid = YDStreamExtractor.getVideoInfo(url,quality=1) #quality is 0=SD, 1=720p, 2=1080p and is a maximum
stream_url = vid.streamURL() #This is what Kodi (XBMC) will play
title = vid.selectedStream()['title'] # this gives the title string
thumbnail = vid.selectedStream()['thumbnail'] # this gives the thumbnail string url