YouTube Links

Download YouTube videos. Video formats are listed at the top of the watch page. Video links are tagged so that they can be downloaded easily.

< 脚本YouTube Links的反馈

评价:一般 - 脚本能用,但还有一些问题

§
发表于:2018-03-09

Script doesn't load when there is "time_continue=digits&" parameter in URL. Potential fix?

When we click "YouTube" logo on embedded player (outside of YouTube) which was already playing some video, we are redirected to URL containing "time_continue=XXX&" parameter in URL which seems to prevent script from showing downloading options.

It looks like it may be caused by code starting from 1411th line which looks like

if(!loc.href.match(/watch\?v=([a-zA-Z0-9_-]*)/))
return false;

If we change regex to accept optional non-capturing group (more info: https://www.regular-expressions.info/brackets.html#noncap) which will handle "time_continue=digits&" like

if(!loc.href.match(/watch\?(?:time_continue=\d+&)?v=([a-zA-Z0-9_-]*)/))
return false;

video identifier will still be placed in group 1, so farther code like

var videoId = RegExp.$1;

will still be valid.

nhyone作者
§
发表于:2018-09-22
编辑于:2018-09-23

Very good! :star:

This will go into the next version (>v1.96).

nhyone作者
§
发表于:2018-09-27

Thank you for your feedback and suggestion. This is now working in v2. :)

发表回复

登录以发表回复。