@donlovett/n8n-nodes-youtube-transcript 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YouTubeTranscript.node.d.ts","sourceRoot":"","sources":["../../../nodes/YouTubeTranscript/YouTubeTranscript.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,
|
|
1
|
+
{"version":3,"file":"YouTubeTranscript.node.d.ts","sourceRoot":"","sources":["../../../nodes/YouTubeTranscript/YouTubeTranscript.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EAGpB,MAAM,cAAc,CAAC;AAgEtB,qBAAa,iBAAkB,YAAW,SAAS;IAClD,WAAW,EAAE,oBAAoB,CAgF/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAkQvE"}
|
|
@@ -1,36 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.YouTubeTranscript = void 0;
|
|
27
4
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
28
|
-
const child_process_1 = require("child_process");
|
|
29
|
-
const util_1 = require("util");
|
|
30
|
-
const fs = __importStar(require("fs"));
|
|
31
|
-
const path = __importStar(require("path"));
|
|
32
|
-
const os = __importStar(require("os"));
|
|
33
|
-
const execAsync = (0, util_1.promisify)(child_process_1.exec);
|
|
34
5
|
// Helper function to extract video ID from URL
|
|
35
6
|
function extractVideoId(input) {
|
|
36
7
|
// Already a video ID (11 characters, alphanumeric with - and _)
|
|
@@ -50,55 +21,31 @@ function extractVideoId(input) {
|
|
|
50
21
|
}
|
|
51
22
|
return input; // Return as-is and let the API handle validation
|
|
52
23
|
}
|
|
53
|
-
// Parse
|
|
54
|
-
function
|
|
55
|
-
const lines = vttContent.split('\n');
|
|
24
|
+
// Parse transcript segments from YouTube's timedtext JSON format
|
|
25
|
+
function parseTranscriptEvents(events) {
|
|
56
26
|
const segments = [];
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
continue;
|
|
63
|
-
}
|
|
64
|
-
// Check for timestamp line (e.g., "00:00:18.790 --> 00:00:18.800")
|
|
65
|
-
const timestampMatch = line.match(/^(\d{2}:\d{2}:\d{2}\.\d{3})\s*-->\s*(\d{2}:\d{2}:\d{2}\.\d{3})/);
|
|
66
|
-
if (timestampMatch) {
|
|
67
|
-
if (currentSegment && currentSegment.text) {
|
|
68
|
-
segments.push(currentSegment);
|
|
69
|
-
}
|
|
70
|
-
currentSegment = {
|
|
71
|
-
start: timestampMatch[1],
|
|
72
|
-
end: timestampMatch[2],
|
|
73
|
-
text: '',
|
|
74
|
-
};
|
|
75
|
-
continue;
|
|
76
|
-
}
|
|
77
|
-
// Add text to current segment
|
|
78
|
-
if (currentSegment && line && !line.match(/^\d+$/)) {
|
|
79
|
-
// Remove VTT formatting tags like <c> and timing tags
|
|
80
|
-
const cleanText = line
|
|
81
|
-
.replace(/<[^>]+>/g, '')
|
|
82
|
-
.replace(/ /g, ' ')
|
|
27
|
+
for (const event of events) {
|
|
28
|
+
if (event.segs) {
|
|
29
|
+
const text = event.segs
|
|
30
|
+
.map((seg) => seg.utf8 || '')
|
|
31
|
+
.join('')
|
|
83
32
|
.trim();
|
|
84
|
-
if (
|
|
85
|
-
|
|
33
|
+
if (text && text !== '\n') {
|
|
34
|
+
segments.push({
|
|
35
|
+
start: (event.tStartMs || 0) / 1000,
|
|
36
|
+
duration: (event.dDurationMs || 0) / 1000,
|
|
37
|
+
text: text.replace(/\n/g, ' ').trim(),
|
|
38
|
+
});
|
|
86
39
|
}
|
|
87
40
|
}
|
|
88
41
|
}
|
|
89
|
-
//
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
const seenTexts = new Set();
|
|
95
|
-
const uniqueSegments = segments.filter(seg => {
|
|
96
|
-
if (seenTexts.has(seg.text)) {
|
|
97
|
-
return false;
|
|
42
|
+
// Deduplicate consecutive identical segments
|
|
43
|
+
const uniqueSegments = [];
|
|
44
|
+
for (const seg of segments) {
|
|
45
|
+
if (uniqueSegments.length === 0 || uniqueSegments[uniqueSegments.length - 1].text !== seg.text) {
|
|
46
|
+
uniqueSegments.push(seg);
|
|
98
47
|
}
|
|
99
|
-
|
|
100
|
-
return true;
|
|
101
|
-
});
|
|
48
|
+
}
|
|
102
49
|
const fullText = uniqueSegments
|
|
103
50
|
.map(seg => seg.text)
|
|
104
51
|
.join(' ')
|
|
@@ -116,7 +63,7 @@ class YouTubeTranscript {
|
|
|
116
63
|
group: ['transform'],
|
|
117
64
|
version: 1,
|
|
118
65
|
subtitle: '={{$parameter["operation"]}}',
|
|
119
|
-
description: 'Fetch transcripts from YouTube videos
|
|
66
|
+
description: 'Fetch transcripts from YouTube videos',
|
|
120
67
|
defaults: {
|
|
121
68
|
name: 'YouTube Transcript',
|
|
122
69
|
},
|
|
@@ -192,6 +139,7 @@ class YouTubeTranscript {
|
|
|
192
139
|
};
|
|
193
140
|
}
|
|
194
141
|
async execute() {
|
|
142
|
+
var _a, _b;
|
|
195
143
|
const items = this.getInputData();
|
|
196
144
|
const returnData = [];
|
|
197
145
|
for (let i = 0; i < items.length; i++) {
|
|
@@ -206,49 +154,158 @@ class YouTubeTranscript {
|
|
|
206
154
|
if (!videoId) {
|
|
207
155
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Invalid video ID or URL provided', { itemIndex: i });
|
|
208
156
|
}
|
|
209
|
-
// Create temp directory for subtitle file
|
|
210
|
-
const tempDir = os.tmpdir();
|
|
211
|
-
const outputPath = path.join(tempDir, `yt_transcript_${videoId}_${Date.now()}`);
|
|
212
|
-
const vttFile = `${outputPath}.${language}.vtt`;
|
|
213
157
|
try {
|
|
214
|
-
//
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
158
|
+
// Step 1: Fetch the video page to get caption track info
|
|
159
|
+
const pageOptions = {
|
|
160
|
+
method: 'GET',
|
|
161
|
+
url: `https://www.youtube.com/watch?v=${videoId}`,
|
|
162
|
+
headers: {
|
|
163
|
+
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
|
164
|
+
'Accept-Language': 'en-US,en;q=0.9',
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
const pageResponse = await this.helpers.httpRequest(pageOptions);
|
|
168
|
+
const pageHtml = typeof pageResponse === 'string' ? pageResponse : JSON.stringify(pageResponse);
|
|
169
|
+
// Extract captions data from the page
|
|
170
|
+
const captionsMatch = pageHtml.match(/"captions":\s*(\{[^}]+\}[^}]+\}[^}]+\})/);
|
|
171
|
+
if (!captionsMatch) {
|
|
172
|
+
// Try alternate pattern for captionTracks
|
|
173
|
+
const tracksMatch = pageHtml.match(/"captionTracks":\s*(\[[^\]]+\])/);
|
|
174
|
+
if (!tracksMatch) {
|
|
175
|
+
returnData.push({
|
|
176
|
+
json: {
|
|
177
|
+
videoId,
|
|
178
|
+
language,
|
|
179
|
+
hasTranscript: false,
|
|
180
|
+
error: 'No captions available for this video',
|
|
181
|
+
transcript: '',
|
|
182
|
+
wordCount: 0,
|
|
183
|
+
},
|
|
184
|
+
});
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
222
187
|
}
|
|
223
|
-
|
|
188
|
+
// Extract the playerCaptionsTracklistRenderer which contains caption URLs
|
|
189
|
+
const playerResponseMatch = pageHtml.match(/ytInitialPlayerResponse\s*=\s*(\{.+?\});/s);
|
|
190
|
+
if (!playerResponseMatch) {
|
|
224
191
|
returnData.push({
|
|
225
192
|
json: {
|
|
226
193
|
videoId,
|
|
227
194
|
language,
|
|
228
195
|
hasTranscript: false,
|
|
229
|
-
error: '
|
|
196
|
+
error: 'Could not parse video data',
|
|
230
197
|
transcript: '',
|
|
231
198
|
wordCount: 0,
|
|
232
199
|
},
|
|
233
200
|
});
|
|
234
201
|
continue;
|
|
235
202
|
}
|
|
236
|
-
|
|
237
|
-
const vttContent = fs.readFileSync(vttFile, 'utf-8');
|
|
238
|
-
const { text, segments } = parseVTT(vttContent);
|
|
239
|
-
// Clean up temp file
|
|
203
|
+
let playerData;
|
|
240
204
|
try {
|
|
241
|
-
|
|
205
|
+
// Find the end of the JSON object properly
|
|
206
|
+
let jsonStr = playerResponseMatch[1];
|
|
207
|
+
let braceCount = 0;
|
|
208
|
+
let endIndex = 0;
|
|
209
|
+
for (let j = 0; j < jsonStr.length; j++) {
|
|
210
|
+
if (jsonStr[j] === '{')
|
|
211
|
+
braceCount++;
|
|
212
|
+
if (jsonStr[j] === '}')
|
|
213
|
+
braceCount--;
|
|
214
|
+
if (braceCount === 0) {
|
|
215
|
+
endIndex = j + 1;
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
jsonStr = jsonStr.substring(0, endIndex);
|
|
220
|
+
playerData = JSON.parse(jsonStr);
|
|
221
|
+
}
|
|
222
|
+
catch (parseError) {
|
|
223
|
+
returnData.push({
|
|
224
|
+
json: {
|
|
225
|
+
videoId,
|
|
226
|
+
language,
|
|
227
|
+
hasTranscript: false,
|
|
228
|
+
error: 'Failed to parse player data',
|
|
229
|
+
transcript: '',
|
|
230
|
+
wordCount: 0,
|
|
231
|
+
},
|
|
232
|
+
});
|
|
233
|
+
continue;
|
|
242
234
|
}
|
|
243
|
-
|
|
244
|
-
|
|
235
|
+
const captions = (_b = (_a = playerData === null || playerData === void 0 ? void 0 : playerData.captions) === null || _a === void 0 ? void 0 : _a.playerCaptionsTracklistRenderer) === null || _b === void 0 ? void 0 : _b.captionTracks;
|
|
236
|
+
if (!captions || captions.length === 0) {
|
|
237
|
+
returnData.push({
|
|
238
|
+
json: {
|
|
239
|
+
videoId,
|
|
240
|
+
language,
|
|
241
|
+
hasTranscript: false,
|
|
242
|
+
error: 'No caption tracks found',
|
|
243
|
+
transcript: '',
|
|
244
|
+
wordCount: 0,
|
|
245
|
+
},
|
|
246
|
+
});
|
|
247
|
+
continue;
|
|
245
248
|
}
|
|
246
|
-
|
|
249
|
+
// Find the caption track for the requested language
|
|
250
|
+
let captionTrack = captions.find((track) => {
|
|
251
|
+
var _a, _b;
|
|
252
|
+
return track.languageCode === language ||
|
|
253
|
+
((_a = track.vssId) === null || _a === void 0 ? void 0 : _a.includes(`.${language}`)) ||
|
|
254
|
+
((_b = track.vssId) === null || _b === void 0 ? void 0 : _b.includes(`a.${language}`));
|
|
255
|
+
});
|
|
256
|
+
// If not found, try to find auto-generated captions
|
|
257
|
+
if (!captionTrack) {
|
|
258
|
+
captionTrack = captions.find((track) => { var _a, _b; return ((_a = track.vssId) === null || _a === void 0 ? void 0 : _a.startsWith('a.')) && ((_b = track.languageCode) === null || _b === void 0 ? void 0 : _b.startsWith(language.split('-')[0])); });
|
|
259
|
+
}
|
|
260
|
+
// Fallback to first available track
|
|
261
|
+
if (!captionTrack) {
|
|
262
|
+
captionTrack = captions[0];
|
|
263
|
+
}
|
|
264
|
+
if (!(captionTrack === null || captionTrack === void 0 ? void 0 : captionTrack.baseUrl)) {
|
|
247
265
|
returnData.push({
|
|
248
266
|
json: {
|
|
249
267
|
videoId,
|
|
250
268
|
language,
|
|
251
269
|
hasTranscript: false,
|
|
270
|
+
error: 'No caption URL found',
|
|
271
|
+
transcript: '',
|
|
272
|
+
wordCount: 0,
|
|
273
|
+
},
|
|
274
|
+
});
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
// Step 2: Fetch the captions in JSON format
|
|
278
|
+
const captionUrl = captionTrack.baseUrl + '&fmt=json3';
|
|
279
|
+
const captionOptions = {
|
|
280
|
+
method: 'GET',
|
|
281
|
+
url: captionUrl,
|
|
282
|
+
headers: {
|
|
283
|
+
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
|
284
|
+
},
|
|
285
|
+
};
|
|
286
|
+
const captionResponse = await this.helpers.httpRequest(captionOptions);
|
|
287
|
+
const captionData = typeof captionResponse === 'string' ? JSON.parse(captionResponse) : captionResponse;
|
|
288
|
+
if (!captionData.events || captionData.events.length === 0) {
|
|
289
|
+
returnData.push({
|
|
290
|
+
json: {
|
|
291
|
+
videoId,
|
|
292
|
+
language,
|
|
293
|
+
hasTranscript: false,
|
|
294
|
+
error: 'Caption data is empty',
|
|
295
|
+
transcript: '',
|
|
296
|
+
wordCount: 0,
|
|
297
|
+
},
|
|
298
|
+
});
|
|
299
|
+
continue;
|
|
300
|
+
}
|
|
301
|
+
// Parse the transcript
|
|
302
|
+
const { text, segments } = parseTranscriptEvents(captionData.events);
|
|
303
|
+
if (!text || text.length < 10) {
|
|
304
|
+
returnData.push({
|
|
305
|
+
json: {
|
|
306
|
+
videoId,
|
|
307
|
+
language: captionTrack.languageCode || language,
|
|
308
|
+
hasTranscript: false,
|
|
252
309
|
error: 'Transcript is empty or too short',
|
|
253
310
|
transcript: '',
|
|
254
311
|
wordCount: 0,
|
|
@@ -261,7 +318,7 @@ class YouTubeTranscript {
|
|
|
261
318
|
returnData.push({
|
|
262
319
|
json: {
|
|
263
320
|
videoId,
|
|
264
|
-
language,
|
|
321
|
+
language: captionTrack.languageCode || language,
|
|
265
322
|
hasTranscript: true,
|
|
266
323
|
transcript: text,
|
|
267
324
|
wordCount,
|
|
@@ -273,7 +330,7 @@ class YouTubeTranscript {
|
|
|
273
330
|
returnData.push({
|
|
274
331
|
json: {
|
|
275
332
|
videoId,
|
|
276
|
-
language,
|
|
333
|
+
language: captionTrack.languageCode || language,
|
|
277
334
|
hasTranscript: true,
|
|
278
335
|
segments,
|
|
279
336
|
segmentCount: segments.length,
|
|
@@ -281,21 +338,13 @@ class YouTubeTranscript {
|
|
|
281
338
|
});
|
|
282
339
|
}
|
|
283
340
|
}
|
|
284
|
-
catch (
|
|
285
|
-
// Clean up any temp files
|
|
286
|
-
try {
|
|
287
|
-
if (fs.existsSync(vttFile))
|
|
288
|
-
fs.unlinkSync(vttFile);
|
|
289
|
-
}
|
|
290
|
-
catch (e) {
|
|
291
|
-
// Ignore cleanup errors
|
|
292
|
-
}
|
|
341
|
+
catch (fetchError) {
|
|
293
342
|
returnData.push({
|
|
294
343
|
json: {
|
|
295
344
|
videoId,
|
|
296
345
|
language,
|
|
297
346
|
hasTranscript: false,
|
|
298
|
-
error:
|
|
347
|
+
error: fetchError instanceof Error ? fetchError.message : 'Failed to fetch transcript',
|
|
299
348
|
transcript: '',
|
|
300
349
|
wordCount: 0,
|
|
301
350
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YouTubeTranscript.node.js","sourceRoot":"","sources":["../../../nodes/YouTubeTranscript/YouTubeTranscript.node.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"YouTubeTranscript.node.js","sourceRoot":"","sources":["../../../nodes/YouTubeTranscript/YouTubeTranscript.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AAEtB,+CAA+C;AAC/C,SAAS,cAAc,CAAC,KAAa;IACpC,gEAAgE;IAChE,IAAI,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACvC,OAAO,KAAK,CAAC;IACd,CAAC;IAED,0CAA0C;IAC1C,MAAM,QAAQ,GAAG;QAChB,oGAAoG;QACpG,2BAA2B;KAC3B,CAAC;IAEF,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAChC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACnC,IAAI,KAAK,EAAE,CAAC;YACX,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;IACF,CAAC;IAED,OAAO,KAAK,CAAC,CAAC,iDAAiD;AAChE,CAAC;AAED,iEAAiE;AACjE,SAAS,qBAAqB,CAAC,MAAa;IAC3C,MAAM,QAAQ,GAA6D,EAAE,CAAC;IAE9E,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC5B,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;YAChB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI;iBACrB,GAAG,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;iBACjC,IAAI,CAAC,EAAE,CAAC;i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