Template:YouTube data display: Difference between revisions
No edit summary |
No edit summary |
||
| Line 5: | Line 5: | ||
</noinclude><includeonly>{{#get_web_data:url=https://youtube.googleapis.com/youtube/v3/videos?part=snippet%2CcontentDetails%2Cstatistics&id={{{YouTube video ID|}}}&key=AIzaSyC-zQp-SoOYbKh64GrNhBK5D3g7H9oX7Zs|format=json}}{{#widget:YouTube|id={{{YouTube video ID|}}}|width=100%}} | </noinclude><includeonly>{{#get_web_data:url=https://youtube.googleapis.com/youtube/v3/videos?part=snippet%2CcontentDetails%2Cstatistics&id={{{YouTube video ID|}}}&key=AIzaSyC-zQp-SoOYbKh64GrNhBK5D3g7H9oX7Zs|format=json}}{{#widget:YouTube|id={{{YouTube video ID|}}}|width=100%}} | ||
<span class="ludohori"><span>👁 Views: [[Views::{{#external_value:viewcount}}]]</span><span>❤ Likes: {{#external_value:likecount}}</span><span>🗩 Comments: {{#external_value:commentcount}}</span><span>📅 Date: {{#time:d F Y|{{#external_value:publishedat}}}}</span><span>⏱ Duration: {{#time: H:i:s|00:00:00 + {{#replace:{{#replace:{{#replace:{{#sub:{{#external_value:duration}}|2}}|M| minutes }}|H| hours }}|S| seconds }} }}</span></span> | <span class="ludohori"><span>👁 Views: [[Views::{{#external_value:viewcount}}]]</span><span>❤ Likes: {{#external_value:likecount}}</span><span>🗩 Comments: {{#external_value:commentcount}}</span><span>📅 Date: {{#time:d F Y|{{#external_value:publishedat}}}}</span><span>⏱ Duration: {{#time: H:i:s|00:00:00 + {{#replace:{{#replace:{{#replace:{{#sub:{{#external_value:duration}}|2}}|M| minutes }}|H| hours }}|S| seconds }} }}</span></span> | ||
{{#set: Video title={{{Video title|{{#external_value:title}} }}} | YouTube video ID={{{YouTube video ID|}}} | Duration={{#expr: {{#replace:{{#replace:{{#sub:{{#external_value:duration}}|2|-1}}|M| * 60 + }}| * 3600 + |:}} }} }} [[Category:YouTube videos]] __NOEDITSECTION__ | |||
{{# | {{#formlink:form=YouTube video page|link text=Edit data with form|link type=|target={{PAGENAME}}}} | ||
</includeonly> | </includeonly> | ||
Revision as of 18:34, 6 February 2023
This is the "YouTubeDataDisplay" template.
Edit the page to see the template text.