youtube-transcript-api-ts 1.0.0 → 1.0.1
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.
- package/README.md +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# youtube-transcript-api-ts
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/youtube-transcript-api-ts)
|
|
4
|
+
|
|
5
|
+
[View on npm](https://www.npmjs.com/package/youtube-transcript-api-ts)
|
|
6
|
+
|
|
3
7
|
A simple, dependency-free (except axios) TypeScript library to fetch transcripts/captions for YouTube videos. This is a port of the popular Python [youtube-transcript-api](https://github.com/jdepoix/youtube-transcript-api).
|
|
4
8
|
|
|
5
9
|
## Features
|
|
@@ -25,7 +29,7 @@ yarn add youtube-transcript-api-ts
|
|
|
25
29
|
By default, the library returns an array of objects containing the text, duration, and offset.
|
|
26
30
|
|
|
27
31
|
```typescript
|
|
28
|
-
import { YoutubeTranscript } from 'youtube-transcript-ts';
|
|
32
|
+
import { YoutubeTranscript } from 'youtube-transcript-api-ts';
|
|
29
33
|
|
|
30
34
|
async function main() {
|
|
31
35
|
try {
|
|
@@ -78,7 +82,7 @@ import {
|
|
|
78
82
|
YoutubeTranscript,
|
|
79
83
|
VideoUnavailable,
|
|
80
84
|
TranscriptsDisabled
|
|
81
|
-
} from 'youtube-transcript-ts';
|
|
85
|
+
} from 'youtube-transcript-api-ts';
|
|
82
86
|
|
|
83
87
|
try {
|
|
84
88
|
await YoutubeTranscript.fetchTranscript('invalid-id');
|