Related:

Clipper - YouTube Template

Need help with importing/exporting templates?

Here is a step-by-step guide: Clipper - Export and Import Templates
And here is a full tutorial for the Obsidian Web Clipper.

Download

Get all my Obsidian Web Clipper templates for free.

Use

For this template to work, you need to open a specific YouTube video.
If you want to capture the description and transcript, you need to

  1. click on show more to see the full description,
  2. scroll to the end of the description and click on show transcript
    before clipping the page to Obsidian.p

Effect

This template

Code

{
	"schemaVersion": "0.1.0",
	"name": "YouTube Embed and transcript",
	"behavior": "create",
	"noteContentFormat": "# {{title}}\n\n![{{schema:name}}]({{url|replace:\"watch?v=\":\"embed/\"}})\n\n{{selectorHtml:#description-inline-expander|remove_html:(\"#structured-description, #snippet, tp-yt-paper-button\")|strip_tags|replace:\"\\#\":\"\\#\"|callout:(\"summary\",\"Description\",true)}}\n\n{{selectorHtml:ytd-engagement-panel-section-list-renderer[visibility$=\\\"EXPANDED\\\"] #segments-container|remove_html:(\"ytd-transcript-section-header-renderer, dom-if\")|replace:(\"</ytd-transcript-segment-renderer>\":\"</ytd-transcript-segment-renderer><hr>\")|markdown|replace:(\"\\n\\n\":\" \")|replace:(\" --- \":\"\\n\")|callout:(\"note\",\"Transcript (Youtube)\",true)}} ",
	"properties": [
		{
			"name": "url",
			"value": "{{meta:property:og:url}}",
			"type": "text"
		},
		{
			"name": "title",
			"value": "{{schema:@VideoObject:name}}",
			"type": "text"
		},
		{
			"name": "channel",
			"value": "{{schema:@VideoObject:author}}",
			"type": "text"
		},
		{
			"name": "thumbnailUrl",
			"value": "{{schema:@VideoObject:thumbnailUrl|first}}",
			"type": "text"
		},
		{
			"name": "duration",
			"value": "{{schema:@VideoObject:duration|replace:\\\"PT\\\",\\\"\\\",\\\"S\\\",\\\"\\\"}}",
			"type": "text"
		},
		{
			"name": "tags",
			"value": "clippings, YouTube",
			"type": "multitext"
		},
		{
			"name": "published",
			"value": "{{schema:@VideoObject:uploadDate|date:\\\"YYYY-MM-DD\\\"}}",
			"type": "date"
		},
		{
			"name": "created",
			"value": "{{time|date:\\\"YYYY-MM-DDTHH:mm:ssZ\\\"}}",
			"type": "date"
		}
	],
	"triggers": [
		"https://www.youtube.com/watch?v="
	],
	"noteNameFormat": "{{date|date:\"YYYY-MM-DD\"}} {{schema:name}} - {{schema:author}}",
	"path": "00 Inbox/Clippings"
}