youtube_parser 2.1.4 copy "youtube_parser: ^2.1.4" to clipboard
youtube_parser: ^2.1.4 copied to clipboard

A minimalist library that extracts IDs from all kinds of YouTube urls

example/main.dart

import 'package:youtube_parser/youtube_parser.dart';

void main() {
  String? videoId = getIdFromUrl('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
  print(videoId); // Valid url, prints 'dQw4w9WgXcQ'

  videoId = getIdFromUrl('https://www.anotherwebsite.com/watch?v=dQw4w9WgXcQ');
  print(videoId); // Not a valid YouTube url, prints null
}
26
likes
160
pub points
92%
popularity

Publisher

verified publishervimuser.com

A minimalist library that extracts IDs from all kinds of YouTube urls

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on youtube_parser