Skip to content

Instantly share code, notes, and snippets.

@apkd
Last active October 22, 2017 21:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apkd/7826ab6b9110eec9b593ad3443ccb97f to your computer and use it in GitHub Desktop.
Save apkd/7826ab6b9110eec9b593ad3443ccb97f to your computer and use it in GitHub Desktop.
Powershell/batch script to download video using StreamLink (takes link from clipboard)
add-type -as System.Windows.Forms;
$url = [windows.forms.clipboard]::GetText()
$arr = $url.split("/")
$arr = $arr[$arr.length - 1].split("=")
$filename = $arr[$arr.length - 1]
echo $filename
&"streamlink" $url "best" "--out" "$($filename).mp4"
@echo off
powershell -executionpolicy remotesigned -file C:\usrbin\download-video.ps1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment