2 haharen Feb 13, 2016 01:28

@haharen
Yes, I know, the ID only will works. But there is written " ... or URL" - and this kind of complete URLs will not work. That's all ;)
Yes, it seems that the youtube function which analyze the complete URL is out of date.
If you have not solved this issue and eager to deal with it as quickly as possible, please replace the code of plugins\videoplug_plugin\_videoplug.plugin.php
at line 206
from
regexp_URL = /^(.+\?v=)?([a-z0-9_?=-]+)$/i;
toregexp_URL = /^(.+\/)?([a-z0-9_?=-]+)$/i;
@haharen URL like these: https://www.youtube.com/watch?v=ZNvzVScj8ws and http://www.youtube-nocookie.com/embed/ZNvzVScj8ws are not catched by the regex you proposed.
I think this other does the trick: /^.+(video\/|\/watch\?v=|embed\/)([a-z0-9_?=-]+)$/i
. You can see it working here: https://regex101.com/r/wO3eU1/2
@mgsolipa
Yes, I only viewed the share button URL but forgot to examine the address bar URL which is also containing the ID with the type of "watch?v=".
Thank you for reminding me.
Hi @mgsolipa ,
We need to add one situation which shared URL is like :
@haharen all right, the updated regex: /^.+(video\/|\/watch\?v=|embed\/|\/)([a-z0-9_?=-]+)$/i
.
Tested here: https://regex101.com/r/wO3eU1/3
Thanks.
@mgsolipa
It's my pleasure.
What is youtube-nocookie.com
. Is it official?
Does anyone have a link to some official info about using this domain/URL?
@mgsolipa ok thanks.
@ednong wrote earlier:
Please just paste the id value
ZNvzVScj8ws
instead of the whole urlhttp://www.youtube.com/video/ZNvzVScj8ws
, have a try.