Commit 4aa8397
committed
fix(video): support YouTube short URLs (youtu.be)
Fixes #557, #554
YouTube share links (youtu.be/ID) were not recognized, only full URLs
(youtube.com/watch?v=ID) worked.
Changes:
- Add youtu.be URL pattern matching
- Improve video ID parsing to handle both formats
- Strip query parameters from short URLs (e.g., ?si=...)
- Also fixes parameter handling in full URLs (e.g., &feature=...)
Now supports:
- https://www.youtube.com/watch?v=VIDEO_ID
- https://www.youtube.com/watch?v=VIDEO_ID&feature=share
- https://youtu.be/VIDEO_ID
- https://youtu.be/VIDEO_ID?si=XXXXX1 parent 7d21718 commit 4aa8397
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
202 | 208 | | |
203 | 209 | | |
204 | 210 | | |
| |||
0 commit comments