youtube_parser
2.1.4, released 3 years ago by vimuser.com
Extracts YouTube video IDs from all kinds of valid YouTube URLs.
WASM-ready
What it does
A minimalist Dart library that parses various forms of YouTube URLs and extracts the underlying video ID. It supports standard watch URLs, short links, embed URLs, and shorts.
AI-written summary of version 2.1.4, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to extract YouTube video IDs from user-provided URLs
- You are building an app that embeds YouTube videos and needs to parse links
Skip it when
- You need a full-featured YouTube API client for fetching playlists, comments, or uploading videos
Strengths
- Zero dependencies
- Supports multiple YouTube URL formats including shorts and embeds
- Cross-platform support
Weaknesses
- Performs only a single specialized parsing task
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:youtube_parser/youtube_parser.dart';
String? a = getIdFromUrl('https://www.youtube.com/watch?v=dQw4w9WgXcQ');Alternatives
Packages that do the same job and could replace youtube_parser.
- sqids
Generate short YouTube-looking IDs from numbers and decode them back.
62Compare - hashids2
Generate short, unique, decryptable YouTube-like hashes from numbers.
50Compare - shortid
Generates short, non‑sequential, URL‑friendly unique strings.
49Compare - slugify
Converts a string into a URL‑friendly slug with configurable delimiter and case options.
49Compare