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. :)

發表回覆

登入以回復

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址