Skip to content

Instantly share code, notes, and snippets.

@e-minguez
Created October 27, 2013 22:34
Show Gist options
  • Save e-minguez/7188735 to your computer and use it in GitHub Desktop.
Save e-minguez/7188735 to your computer and use it in GitHub Desktop.
Get youtube "src" links from an URL
#!/bin/sh
# Credits to http://blog.viktorkelemen.com/2011/07/get-links-from-page-with-bash.html
URL=$1
curl ${URL} 2>&1 | grep -o -E 'src="http://www.youtube([^"#]+)"' | cut -d'"' -f2
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment