Template talk:YouTube/Archive 2

Latest comment: 1 year ago by MJL in topic "link=no" by default
Archive 1Archive 2

I would like to suggest that before a mechanism to delink erroneous wikilinks in the title is implemented, a tracking category should be established so that those links, which could have some value, be moved outside the template. -- Michael Bednarek (talk) 06:54, 5 January 2020 (UTC)

Good idea. I have implemented the delinking (with a workaround to fix a long-standing bug, T14974, that wrapped some lines) in order to fix Linter errors. See the testcases page for wikilink examples that were rendering poorly in (at least) dozens of existing articles. I will work on the category tracking next. – Jonesey95 (talk) 15:16, 5 January 2020 (UTC)
I have added a tracking category to find wikilinks in title parameters. Unfortunately, it also catches instances where there is extra whitespace in the template, but I have found that there is often other cleanup needed if excess whitespace is present, so it's not entirely a false positive. Post here if you find any problems with these changes. – Jonesey95 (talk) 15:54, 5 January 2020 (UTC)
So far, I have found and fixed about 30 articles, and more are flowing into the category. The only true false positive I have found so far is in Archpoet, which uses a {{lang}} template inside the YouTube template. That is a legitimate use and there is no error, but my code is not good enough to weed it out. Unless someone has a better way to find wikilinks in titles, we may need to leave that article alone until the error-tracking and fixing is done and the wikilink detection code can be removed. – Jonesey95 (talk) 16:10, 5 January 2020 (UTC)
Michael Bednarek and other watchers of this page: Category:Articles using YouTube with invalid parameters currently has about 160 articles in it. I have cleaned up a few dozen, and it is very easy. Just search for "Youtube" on the page and apply an appropriate fix. I usually tidy up the whole article a bit while I am at it, especially if I am just removing an extra space character from the template. If you want to help, please do.
Based on my perusal of Special:LintErrors/wikilink-in-extlink, which is what started me down this delinking path, I expect there to be a few hundred affected articles in total. – Jonesey95 (talk) 23:26, 5 January 2020 (UTC)
I've dealt with those articles in that tracking category (warm thanks for that) that fall into my area of interest. I don't think I have the stomach to deal with any of the others. -- Michael Bednarek (talk) 13:26, 6 January 2020 (UTC)

No 'date' or 'access-date' etc

Most cite(citation) templates have a 'date=' (of publishing for example), 'publisher=', and 'access-date=', but not for YouTube videos.
Is there a reason this is not implemented, or could it be done?

I have added these 'fields' 'manually' here by (among other edits) adding the bolded text before the closing '</ref>'

ie.: <ref name=youtube-bb-farewell>{{youtube |yx7-yvXf6f8 |“Bitchin’ Betty” Says Farewell: Beloved Voice Behind Boeing’s F/A-18 Super Hornet Retires}}. Boeing, 2016-03-07, Retrieved 2020-02-19.</ref>[1][2]

References

The References above shows the difference, which I suppose is non-WP:MOS, but more informative?
Regards, 220 of Borg 06:22, 19 February 2020 (UTC)

I note now that linking to YouTube, esp. as a source, is not encouraged. Per Template talk:YouTube/Archive 1#YouTube links on wikipedia. 220 of Borg 06:26, 19 February 2020 (UTC)
Maybe Template:Cite AV media is what is really needed? 🤔   220 of Borg 06:34, 19 February 2020 (UTC)
220 of Borg: {{cite video}} with |via=Youtube? —Sladen (talk) 11:42, 19 February 2020 (UTC)

Would it be possible to add the possibility to put some text with wikilinks after the youtube link. For example, as I somewhat improvised at Thou knowest, Lord, the secrets of our hearts (Purcell):

It could be something like this:

I'm not quite sure how to translate this into the much more complex template this is so if anybody can help that would be appreciated. Thanks, RandomCanadian (talk | contribs) 17:17, 16 May 2020 (UTC)

Per the first paragraph at {{TPER}}, "...if the request is anything other than merely technical, consensus should be sought before the template is added...". This is not "merely technical", so I'm removing the TPER. ―Mandruss  17:28, 16 May 2020 (UTC)
I can't say I see a real need. Your "somewhat improvised" solution seems fine. Two other instances of that same solution are seen at Pie Jesu#External links, for example, and they seem fine, too. ―Mandruss  17:31, 16 May 2020 (UTC)
+1: What Mandruss wrote. -- Michael Bednarek (talk) 02:13, 17 May 2020 (UTC)
I just thought it would be better if the description could be included directly in the template; often times if I "improvise" a solution the the wording feels a bit awkward as "on Youtube" would most logically go at the end of the sentence, not right in the middle; eg. as is done at Ye Choirs of New Jerusalem (where User:Gerda Arendt replaced the raw links with the template before self reverting because it was not an improvement). Adding a parameter for optional additional description where this is an improvement is not unprecedented, for example all user warnings templates have this. Of course it's a minor issue so if it's needlessly complex, then not necessary. Cheers, RandomCanadian (talk | contribs) 02:51, 17 May 2020 (UTC)
At Ye Choirs of New Jerusalem, this:
Was changed by Gerda to this:
Which should have been this:
Or this:
I think you're trying to view the entire string as a single grammatical construct, in fact you called it a "sentence". I read it as a link "on YouTube", followed by supplementary descriptive information – two separate and distinct "pieces". I think we need more justification than this to add complexity to both the template code and the template doc. ―Mandruss  10:41, 17 May 2020 (UTC)
Besides, your proposed solution wouldn't be without issues of its own:
suggesting that the piece was sung on YouTube, when in fact it was sung at Cambridge, presumably, and the video of the performance was subsequently uploaded to YouTube. Nothing is ever sung "on YouTube", except perhaps livestream performances.Mandruss  11:07, 17 May 2020 (UTC)

Ok, in that case. Cheers, RandomCanadian (talk | contribs) 14:31, 17 May 2020 (UTC)

@Mandruss: Regarding the last point you made, and I didn't think of it earlier, this could be solved by putting on Youtube in parenthesis, eg.
Cheers, RandomCanadian (talk | contribs) 18:04, 18 May 2020 (UTC)
A solution to a nonexistent problem, but ok. Striking that part. ―Mandruss  18:09, 18 May 2020 (UTC)

YouTube Path /c/

Known example:

Same channel by user:

Conrad T. Pino (talk) 16:01, 10 July 2020 (UTC)

I just fixed a few, and there are more, for example in The Love Nest (1923 film). Is there a way to detect a broken youtube link, when a video is removed from YouTube for one reason or another? --Piotr Konieczny aka Prokonsul Piotrus| reply here 10:09, 24 August 2020 (UTC)

Timestamp

I know you can link to a time offset using "t=5m25s" but why doesn't it show up in the rendered markup? If you reference the same video many times, it looks like you have duplicated references. ImTheIP (talk) 23:28, 15 September 2020 (UTC)

{{YouTube|id=dQw4w9WgXcQ|time=1m25s|title=Instructional video (@1:25)}}Instructional video (@1:25) on YouTube
The time stamp is placed into the URL, which is hidden behind the link. Use |title= for a custom title. – Jonesey95 (talk) 00:04, 16 September 2020 (UTC)

c not working

Using {{YouTube|c=mohitbahl}}

results in

https://www.youtube.com/channel/mohitbahl

Instead of the intended

https://youtube.com/c/mohitbahl

The generated url does not exist.

--Auric talk 13:36, 28 September 2020 (UTC)

https://www.youtube.com/channel/UCK5Naxq6KVwu7si7UOv9ZlQ works: Mohit Bahl's channel on YouTube -- Michael Bednarek (talk) 13:53, 28 September 2020 (UTC)

New parameter for custom URL

A YouTube channel currently can be accessed in three different ways:

  1. With a username:
    https://www.youtube.com/user/ammy602
  2. With a channel id:
    https://www.youtube.com/channel/UC_EyZIU4fEJDaNjRS3T5G_A
  3. With a channel alias custom URL:
    https://www.youtube.com/c/JugoBeat

As users ConradPino and Auric have pointed out above, this template currently considers only cases 1 and 2; there isn't a syntax for case 3. This could be done by removing the equivalence between {{{c}}} and {{{channel}}}, and using {{{c}}} exclusively for case 3. A bot would have to convert all prior instances of |c= into |channel= in articles where it is used. Alternatively, a new parameter can be created for case 3. Can a template editor please implement this? —capmo (talk) 00:44, 27 December 2020 (UTC)

I have added an alias parameter to the sandbox. Test cases can be viewed at Template:YouTube/testcases#Alias. Please let me know what you think? — Martin (MSGJ · talk) 20:25, 27 December 2020 (UTC)
Hi MSGJ, that's excellent, thank you! Just a correction, if you don't mind: I called this new parameter "alias" for lack of a better name, but here I learned that it's called a Custom URL. Could you please replace alias with custom when updating the template? I volunteer to update the documentation after that. Thanks again! —capmo (talk) 01:08, 28 December 2020 (UTC)
  Done — Martin (MSGJ · talk) 11:07, 28 December 2020 (UTC)
Hi Martin, when updating the documentation I found a logic error in the code: the {{{id}}} must be the last test in the IF sequence, because it's the only one that accepts a syntax with no named parameters. The new IF must then be moved up a bit. There's also a couple of parameter tests that were missing at the end. I've made the corrections to the template's sandbox. Regards, —capmo (talk) 15:15, 28 December 2020 (UTC)
Sure. Can you just show me an example in the test cases? There are a few in #Video which are still showing errors with the sandbox code. — Martin (MSGJ · talk) 20:02, 28 December 2020 (UTC)
Those testcases showing errors were created with bad syntax on purpose: [1]. I tested the sandbox while updating the documentation and it worked fine. Anyway, I've added a third example in Custom URL that shows the difference. —capmo (talk) 21:57, 28 December 2020 (UTC)
Thanks for doing that. I've deployed your changes — Martin (MSGJ · talk) 15:47, 29 December 2020 (UTC)

YouTube ?

-- YavBav09 (talk)  19:46, 2 May 2021 (UTC)
Nope, as that would not comply with WP:NFCC and it would just provide useless image clutter. RandomCanadian (talk / contribs) 22:09, 2 May 2021 (UTC)

Not picking up from wikidata when no paramaters specified

Tried just specifyed the name of template alone with no parameters for "Good Law Project" and despite the matching wikidata item having all the info you think it would need, it erroring with the following, I shall do it manually with parameters for now

Back ache (talk) 06:33, 20 October 2021 (UTC)

This template is not designed to fetch any items from Wikidata, not d:Property:P2397 (YouTube channel ID) or anything else. -- Michael Bednarek (talk) 07:18, 20 October 2021 (UTC)
@Michael Bednarek: Is there any reason why it couldn't be in the future? I can't think of anything this would break if implemented properly. --Hiculd (talk) 17:46, 9 December 2021 (UTC)
It probably could, after discussion. -- Michael Bednarek (talk) 01:41, 10 December 2021 (UTC)

The website youtu.be can be used for short video links. Could this template be modified so that it uses youtu.be for video links? Also, why does "Video" instead of the url appear when no title has been specified? JsfasdF252 (talk) 23:51, 27 February 2022 (UTC)

Why would the shortened URL via youtu.be be needed? The default |title= of "Video" is just fine; the URL has no information. -- Michael Bednarek (talk) 03:30, 28 February 2022 (UTC)
@JsfasdF252: Why on earth would we want to use short links? What's wrong with using the full URL? This is unworkable anyway because, like most link shorteners, youtu.be has been on the global spam blacklist since 2010 and it is impossible to use on any WMF sites. "Video" is also a much less obtrusive default link than the youtube video URL, I don't see the benefit of changing it. 192.76.8.77 (talk) 21:29, 28 February 2022 (UTC)
According to Wikipedia:Bare URLs, the word "Video" gives less information for the reader than the URL. JsfasdF252 (talk) 22:09, 21 May 2022 (UTC)
And if you mouse over the link, you have all the information, including the full URL. And given how this template by default adds "on Youtube", there's really no reason to change it. Youtube links aren't that long anyway. RandomCanadian (talk / contribs) 12:32, 22 May 2022 (UTC)

YouTubers with multiple channels phrasing

I was reading Technoblade's article and I saw the external link second with this redundancy:

I hand coded it and fixed it, but I was wondering if there is a better way to do it?

Thank you Wil540 art (talk) 19:43, 1 July 2022 (UTC)

Extend Template with date ?

every video has an upload date, other languages have this parameter. .... 0mtwb9gd5wx (talk) 00:15, 11 June 2021 (UTC)

I am in favor of adding a (download) date. It is useful information when studying ongoing events (climate change, etc.). 2001:2003:F646:4A00:839:8D70:599A:68BF (talk) 13:04, 20 April 2022 (UTC)
Sorry my language: I mean (upload) date. 2001:2003:F646:4A00:839:8D70:599A:68BF (talk) 13:05, 20 April 2022 (UTC)
I also support this. There should definetly be a parameter for the date of upload. Veverve (talk) 19:47, 1 January 2023 (UTC)

YouTube Shorts

This template doesn't seem to be able to link to the new Shorts format videos? (ie. TikTok/Vine clone with vertical video)

www.youtube.com/shorts/IDCODEHERE

-- 65.92.247.226 (talk) 02:01, 25 September 2022 (UTC)

This template doesn't support Shorts yet. InfiniteNexus (talk) 04:28, 25 September 2022 (UTC)
Doesn't need to: Shorts example on YouTube. -- Michael Bednarek (talk) 05:55, 25 September 2022 (UTC)
Shorts can be viewed either in Shorts mode or regular video mode. The video you just linked takes you to regular video mode. The IP was asking about Shorts mode, which the template doesn't support. InfiniteNexus (talk) 05:44, 30 September 2022 (UTC)
I have no objections against implementing something like |short=abcdefg which could be used instead of |id=abcdefg. -- Michael Bednarek (talk) 06:13, 30 September 2022 (UTC)
Well I don't have template-editing rights, so someone who does will have to do it. InfiniteNexus (talk) 21:38, 30 September 2022 (UTC)
@Michael Bednarek: Since the video IDs are the same (e.g., https://www.youtube.com/shorts/qYAbfugde54 vs. https://www.youtube.com/watch?v=qYAbfugde54), I would prefer something more like |shorts=yes instead. —Uzume (talk) 21:16, 19 January 2023 (UTC)
@InfiniteNexus: Well, I have TPE and there are some other things on this template I would like to work on too so I shall just add this to the TODO list for that (unless someone beats me to it). —Uzume (talk) 01:52, 20 January 2023 (UTC)
Thanks. InfiniteNexus (talk) 05:10, 20 January 2023 (UTC)

Handle Support

Can I use Youtube Handle? Bcxfu75k (talk) 20:37, 30 December 2022 (UTC)

You mean as a source for WP articles? Or the feature? If it's the former, yes, though a third-party source is preferable. If the latter, WP:NOTFORUM. InfiniteNexus (talk) 21:29, 30 December 2022 (UTC)
The template currently does not support linking to YouTube channels via their handles though it could be modified to support such via something like |handle= (much as it currently supports |user= and |custom=). —Uzume (talk) 21:38, 19 January 2023 (UTC)
@Bcxfu75k: I added handle support with 1136063242. —Uzume (talk) 16:06, 28 January 2023 (UTC)

"link=no" by default

Doesn't the dumb link to [[YouTube]] constitute MOS:OVERLINKING for many years already? Just imagine a sane human who doesn't know what YouTube is. — Mike Novikoff 04:15, 1 January 2023 (UTC)

Please link to an article where this is a problem. There are new people coming on to the internet every day, and some of them have not heard of YouTube. – Jonesey95 (talk) 18:03, 1 January 2023 (UTC)
The article that I was editing by the time I thought of it was this. Wouldn't these same newbies be confused when they don't know on what link to click? (Even worse: to tap. And even if they click with a mouse, they haven't learned a middle button yet).
Not to mention how this irritates the experienced users. — Mike Novikoff 21:13, 5 January 2023 (UTC)
@Jonesey95: The overlinking issue can be easily seen with things like Special:WhatLinksHere/YouTube. The solution is not to default to not linking but rather to link to the article via redirects as Module:Citation/CS1 (it was heavily discussed on its talk page; check its archives) and many other linking templates that have followed suite have done. It would also be handy as an alternative (instead of attempting to use tracking categories) to determine which way the template was used by using different redirects for different parameters/YouTube identifiers used by the template. For example, we could make these all into redirects to YouTube and then link to them instead: YouTube channel (identifier), YouTube handle (identifier), YouTube user (identifier), YouTube custom (identifier), YouTube show (identifier), YouTube playlist (identifier), YouTube video (identifier). —Uzume (talk) 22:04, 19 January 2023 (UTC)
That sounds like a possible resolution. Feel free to work on it in the template's sandbox. – Jonesey95 (talk) 22:10, 19 January 2023 (UTC)
@Jonesey95, Uzume, and Mike Novikoff: I've effected this suggest change with this editMJLTalk 16:26, 29 May 2023 (UTC)