Last active
October 22, 2017 21:12
-
-
Save apkd/7826ab6b9110eec9b593ad3443ccb97f to your computer and use it in GitHub Desktop.
Powershell/batch script to download video using StreamLink (takes link from clipboard)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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