Kodi Community Forum
Release [Module] youtube-dl - multi-site playable URL resolver - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154)
---- Thread: Release [Module] youtube-dl - multi-site playable URL resolver (/showthread.php?tid=200877)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20


RE: [Module] youtube-dl - multi-site playable URL resolver - mujunk - 2014-08-19

(2014-08-19, 15:32)ruuk Wrote:
(2014-08-19, 12:56)mujunk Wrote: Pardon my ignorance. What is the Average Joe required to do with this? I have installed your repo but couldnt find this under video addons.

This isn't for the "Average Joe". This is a module for other addons to use. It's main feature it that it converts the video URL to the actual playable video URL. One of the hardest parts of coding a video addon is to access the actual playable URL. Not only does it take some complex parsing and various tricks to accomplish, the method also needs to change occasionally to adapt to changes in the site.

The youtube-dl project works with hundreds of sites and is updated constantly for changes in those sites.

So for instance the YouTube addon recently had issues playing videos because of changes in the YouTube site. If this module had existed at that time and the YouTube addon was using it it would not have needed any intervention by the author to account for those changes, because the youtube-dl project was quickly updated.
Another example of it's usage is in my Forum Browser addon. It allows it to play video links from a variety of sites without me having to do anything but pass in the video page URL.

Sounds like clever stuff. Appreciate your time and effort in explaining. I take it that the end user need not install anything, but would be built-in by the addon developers.


Re: RE: [Module] youtube-dl - multi-site playable URL resolver - ruuk - 2014-08-19

(2014-08-19, 21:22)mujunk Wrote:
(2014-08-19, 15:32)ruuk Wrote:
(2014-08-19, 12:56)mujunk Wrote: Pardon my ignorance. What is the Average Joe required to do with this? I have installed your repo but couldnt find this under video addons.

This isn't for the "Average Joe". This is a module for other addons to use. It's main feature it that it converts the video URL to the actual playable video URL. One of the hardest parts of coding a video addon is to access the actual playable URL. Not only does it take some complex parsing and various tricks to accomplish, the method also needs to change occasionally to adapt to changes in the site.

The youtube-dl project works with hundreds of sites and is updated constantly for changes in those sites.

So for instance the YouTube addon recently had issues playing videos because of changes in the YouTube site. If this module had existed at that time and the YouTube addon was using it it would not have needed any intervention by the author to account for those changes, because the youtube-dl project was quickly updated.
Another example of it's usage is in my Forum Browser addon. It allows it to play video links from a variety of sites without me having to do anything but pass in the video page URL.

Sounds like clever stuff. Appreciate your time and effort in explaining. I take it that the end user need not install anything, but would be built-in by the addon developers.

Yeah, this module addon gets imported by addons that require it.


RE: [Module] youtube-dl - multi-site playable URL resolver - alibaba011 - 2014-09-06

Hi, is this module works for the youtube playlist or channel? I have tried single video and it works. But if you pass channel or playlist url, it seems to fail saying No suitable extractor found. So, right now i have to extract the every single video link from the playlist or channel. Can you check if playlist/channel url is playable for you.

Here is the function i have:

Quote:def YDex(url):
url = 'https://www.youtube.com/channel/UCzPO5IPzbQwq4VJxejIMwMw' # This dont work
url='https://www.youtube.com/watch?v=07FYdnEawAQ' # This works
vid = YDStreamExtractor.getVideoInfo(url,resolve_redirects=True,quality=1)
print vid
choices = []
if vid.hasMultipleStreams():
for s in vid.streams():
#print 's is %s' %s
xbmc_url = s['xbmc_url']
choices.append(xbmc_url)
return choices
pass
#index += 1
vid.selectStream(choices) #You can also pass in the the dict for the chosen stream

stream_url = vid.streamURL()
return stream_url

Thanks for the help
Edit : It looks like your _blacklist is the reason it fails to extract. So, i just comment this out.


RE: [Module] youtube-dl - multi-site playable URL resolver - ruuk - 2014-09-15

(2014-09-06, 04:28)alibaba011 Wrote: Hi, is this module works for the youtube playlist or channel? I have tried single video and it works. But if you pass channel or playlist url, it seems to fail saying No suitable extractor found. So, right now i have to extract the every single video link from the playlist or channel. Can you check if playlist/channel url is playable for you.

Here is the function i have:

Quote:def YDex(url):
url = 'https://www.youtube.com/channel/UCzPO5IPzbQwq4VJxejIMwMw' # This dont work
url='https://www.youtube.com/watch?v=07FYdnEawAQ' # This works
vid = YDStreamExtractor.getVideoInfo(url,resolve_redirects=True,quality=1)
print vid
choices = []
if vid.hasMultipleStreams():
for s in vid.streams():
#print 's is %s' %s
xbmc_url = s['xbmc_url']
choices.append(xbmc_url)
return choices
pass
#index += 1
vid.selectStream(choices) #You can also pass in the the dict for the chosen stream

stream_url = vid.streamURL()
return stream_url

Thanks for the help
Edit : It looks like your _blacklist is the reason it fails to extract. So, i just comment this out.

Just saw your post - somehow I missed it.

Where is the _blacklist you mentioned?


v14.925.0 - ruuk - 2014-09-25

Version 14.925.0

Changes:
  • Update youtube-dl core to 2014.09.25


On my REPO.


RE: [Module] youtube-dl - multi-site playable URL resolver - ruuk - 2014-09-25

(2014-09-06, 04:28)alibaba011 Wrote: It looks like your _blacklist is the reason it fails to extract. So, i just comment this out.
I figured out what you were talking about. The variable is actually in all caps and my search was apparently case sensitive Smile

Anyway, since the addon is in the official repository now, you shouldn't need to include the module code with your addon.
Also you can just edit the _BLACKLIST in your code instead of modifying the source with:

Code:
import YDStreamExtractor
YDStreamExtractor._BLACKLIST = []

Just do that before you make any calls to the module's methods.


RE: [Module] youtube-dl - multi-site playable URL resolver - ssy080 - 2014-10-17

Hello,

I think the addon is grabbing segmented files of Tudou links even though a link to the full video exist. An example would be http://www.tudou.com/v/6xMNLKMJxKQ/&resourceId=0_04_05_99/v.swf

The addon that I am using in addition to this script addon is the baykoreans addon.

http://219.224.102.8/f4v/81/210644981.h264_98_seg_0.040019360054396AFAE5AB74E7862B4702BF87-6E62-35E4-7588-000253163668.f4v?key=44d3e6bb1c2c7845a03e1d544097940040142ff1f7&playtype=19&tk=183835815301538507720805210&brt=19&bc=0&xid=040019360054396AFAE5AB74E7862B4702BF87-6E62-35E4-7588-000253163668&nt=0&nw=1&bs=0&ispid=1009&rc=200&inf=12&si=un&npc=3936&pp=0&ul=0&mt=0&sid=0&pc=0&cip=162.157.209.28&id=tudou&hf=0&hd=0&sta=0&ssid=0&itemid=253163668&fi=0&sz=44427412|User-Agent=Mozilla%2F5.0+%28X11%3B+Linux+x86_64%3B+rv%3A10.0%29+Gecko%2F20100101+Firefox%2F10.0+%28Chrome%29

This is the resolved url, and you can notice _seg_ in the url, meaning it is a segmented video. Is this fixable?

Thank you!


RE: [Module] youtube-dl - multi-site playable URL resolver - Chiitus - 2014-10-25

How can i play video files from another sites? I don't get it :/ Sry i'm nb


RE: [Module] youtube-dl - multi-site playable URL resolver - Skipmode A1 - 2014-10-25

This isn't meant for end-users, but more for the addon coders.


RE: [Module] youtube-dl - multi-site playable URL resolver - ruuk - 2014-10-25

(2014-10-25, 19:01)Skipmode A1 Wrote: This isn't meant for end-users, but more for the addon coders.
Thanks for answering Smile
(2014-10-25, 15:46)Chiitus Wrote: How can i play video files from another sites? I don't get it :/ Sry i'm nb
An example of how this is used is in my Forum Browser addon. It allows it to play video links in forum posts. Also the Pushbullet addon that muttley and I are working on let's you push video links to Kodi and this module allows it to play them.


RE: [Module] youtube-dl - multi-site playable URL resolver - ruuk - 2014-10-25

(2014-10-17, 06:19)ssy080 Wrote: Hello,

I think the addon is grabbing segmented files of Tudou links even though a link to the full video exist. An example would be http://www.tudou.com/v/6xMNLKMJxKQ/&resourceId=0_04_05_99/v.swf

The addon that I am using in addition to this script addon is the baykoreans addon.

http://219.224.102.8/f4v/81/210644981.h264_98_seg_0.040019360054396AFAE5AB74E7862B4702BF87-6E62-35E4-7588-000253163668.f4v?key=44d3e6bb1c2c7845a03e1d544097940040142ff1f7&playtype=19&tk=183835815301538507720805210&brt=19&bc=0&xid=040019360054396AFAE5AB74E7862B4702BF87-6E62-35E4-7588-000253163668&nt=0&nw=1&bs=0&ispid=1009&rc=200&inf=12&si=un&npc=3936&pp=0&ul=0&mt=0&sid=0&pc=0&cip=162.157.209.28&id=tudou&hf=0&hd=0&sta=0&ssid=0&itemid=253163668&fi=0&sz=44427412|User-Agent=Mozilla%2F5.0+%28X11%3B+Linux+x86_64%3B+rv%3A10.0%29+Gecko%2F20100101+Firefox%2F10.0+%28Chrome%29

This is the resolved url, and you can notice _seg_ in the url, meaning it is a segmented video. Is this fixable?

Thank you!

In case anyone wonders, this was answered HERE.


v14.1026.0 - ruuk - 2014-10-26

Version 14.1026.0

Changes:
  • Update youtube-dl core to 2014.10.26


On my REPO.

Also pushed to official repository, pending mirrors update.


RE: [Module] youtube-dl - multi-site playable URL resolver - zeddymac - 2014-10-31

thanks for your work ruuk i use to live in the 3 6 0 to back in the day went to Olympic grad in 02


RE: [Module] youtube-dl - multi-site playable URL resolver - phil65 - 2014-12-03

Also wanted to put out a quick "thanks". Smile
DIdnt know of this module since last week, I use it now mainly to display trailers in my ExtendedInfo Script, so I donĀ“t have to rely on the youtube plugin anymore. Smile
Cheers


RE: [Module] youtube-dl - multi-site playable URL resolver - mac1202 - 2014-12-10

Hi i tried to use this addon in addition with your pushbullet addon to send video hosting url to play from firefox to xbmc.
I have succesfully installed your repo, installed pushbullet and configure it and it working. But i can't find youtube-dl addon on your repo and sending for example youtube link via pushbullet doesnt work i just got a loading message on xmbc and nothing after. Going to pushbullet addon on xbmc the video link appear but clicking on it give me a no handler for this type af push error. I'm little lost here can anyone help me.
I'm using xbmc 13 on manjaro linux.
Edit : downloaded extension from here https://ruuks-repo.googlecode.com/svn/trunk/repo/script.module.youtube.dl/ and installed from zip worked.


This forum uses Lukasz Tkacz MyBB addons.