commit 3e076c42271fb8beb4de39c045fd501adaba4e00 parent 9b071d46825db6b7a14d631dc60b6751b6e815fe Author: hhvn <dev@hhvn.uk> Date: Sun, 2 Jan 2022 03:24:43 +0000 .s/b/s/youtube: grab youtube links Diffstat:
A | .scripts/bin/scrape/youtube | | | 6 | ++++++ |
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/.scripts/bin/scrape/youtube b/.scripts/bin/scrape/youtube @@ -0,0 +1,6 @@ +#!/bin/rc +# get youtube links + +sed 's/<[^>]*>//g' | + grep -Eo 'https://www.youtube.com/watch\?v=.{11}|https://youtu.be/.{11}|https://www.youtube.com/embed/.{11}' | + sed -E 's~.*(.{11})$~https://www.youtube.com/embed/\1~g'