n8n-nodes-youtube-transcript
Advanced tools
Comparing version
@@ -66,2 +66,11 @@ "use strict"; | ||
fallbackLanguage = this.getNodeParameter('fallbackLanguage', itemIndex, 'en'); | ||
const urlRegex = /^(http(s)?:\/\/)?((w){3}.)?youtu(be|.be)?(\.com)?\/.+/; | ||
if (urlRegex.test(youtubeId)) { | ||
const url = new URL(youtubeId); | ||
const v = url.searchParams.get('v'); | ||
if (!v) { | ||
throw new n8n_workflow_1.ApplicationError(`The provided URL doesn't contain a valid YouTube video identifier. URL: ${youtubeId}`); | ||
} | ||
youtubeId = v; | ||
} | ||
let transcript; | ||
@@ -68,0 +77,0 @@ try { |
{ | ||
"name": "n8n-nodes-youtube-transcript", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "download transcript of youtube videos in your n8n workflows", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
{ | ||
"name": "n8n-nodes-youtube-transcript", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "download transcript of youtube videos in your n8n workflows", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
46393
10.9%139
6.92%