Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add extract option using details #9

Merged
merged 3 commits into from
Oct 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,21 @@ This is the NuGet package library that retrieves subtitles from a given YouTube
1. Extract subtitles from the given YouTube video URL. There are a few options to extract subtitles.

```csharp
// Extract video details from the given YouTube video URL.
VideoDetails details = await youtube.ExtractVideoDetailsAsync(youtubeUrl);

// Extract a single subtitle from the given YouTube video URL.
// - defaults to English (en)
var subtitle = await youtube.ExtractSubtitleAsync(youtubeUrl);
Subtitle subtitle = await youtube.ExtractSubtitleAsync(youtubeUrl);

// Extract a single subtitle from the given YouTube video URL with the specified language code.
// eg) Korean (ko)
var subtitle = await youtube.ExtractSubtitleAsync(youtubeUrl, "ko");
Subtitle subtitle = await youtube.ExtractSubtitleAsync(youtubeUrl, "ko");

// Extract list of subtitles from the given VideoOptions instance.
// eg) English and Korean (ko)
var options = new VideoOptions { Url = youtubeUrl, LanguageCodes = { "en", "ko" } };
var subtitles = await youtube.ExtractSubtitlesAsync(options);
List<Subtitle> subtitles = await youtube.ExtractSubtitlesAsync(options);
```

## Issues or Feedbacks
Expand Down
Loading