youtube_explode_dart 1.10.7-dev.1 youtube_explode_dart: ^1.10.7-dev.1 copied to clipboard
A port in dart of the youtube explode library. Supports several API functions without the need of Youtube API Key.
// ignore_for_file: avoid_print
import 'package:youtube_explode_dart/youtube_explode_dart.dart';
import 'package:youtube_explode_dart/src/youtube_explode_base.dart';
Future<void> main() async {
var yt = YoutubeExplode();
var video =
await yt.videos.get('https://www.youtube.com/watch?v=bLwZiriLHaI');
print('Title: ${video.title}');
final m = await yt.videos.streamsClient.getManifest(video.id);
print(m.streams);
m.streams.forEach((e) {
print('$e: ${e.url}');
});
// Close the YoutubeExplode's http client.
yt.close();
}