Update example

This commit is contained in:
Mattia 2021-03-26 10:07:54 +01:00
parent 6fa1dec14c
commit 7661c1d232
1 changed files with 7 additions and 6 deletions

View File

@ -1,14 +1,15 @@
// ignore_for_file: avoid_print // ignore_for_file: avoid_print
import 'package:youtube_explode_dart/youtube_explode_dart.dart'; import 'package:youtube_explode_dart/youtube_explode_dart.dart';
import 'package:youtube_explode_dart/src/youtube_explode_base.dart';
Future<void> main() async { Future<void> main() async {
final yt = YoutubeExplode(); var yt = YoutubeExplode();
var video =
await yt.videos.get('https://www.youtube.com/watch?v=AI7ULzgf8RU');
var manifest = await yt.videos.closedCaptions.getManifest('Pxgvgh9IFqA'); print('Title: ${video.title}');
print(manifest.tracks);
print('\n\n---------------------\n\n');
manifest = await yt.videos.closedCaptions.getManifest('Pxgvgh9IFqA'); // Close the YoutubeExplode's http client.
print(manifest.tracks);
yt.close(); yt.close();
} }