Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##### shell for linux
- #!/bin/bash
- OUTDIR="soundpostbackup"; mkdir $OUTDIR
- for f in *catbox*.webm; do
- URL=$(echo $f | sed -n "s/^.*\(https.*\)].*$/\1/p" | sed -re 's/%2[Ff]/\//g' -e 's/%3[Aa]/:/g')
- FILENAME="$OUTDIR/$(echo -n $URL | awk -F / '{print $NF}')"
- echo "Downloading $URL to $FILENAME"
- curl -L -s -k "$URL" > $FILENAME
- done
- #### powershell if you're a windows user
- Add-Type -AssemblyName System.Web
- $outdir = ".\soundpostbackup"
- $ProgressPreference = "SilentlyContinue"
- new-item -type dir $outdir -force
- (get-childitem -recurse *catbox*.webm).name | %{
- $filename = $_;
- $url = [System.Web.HttpUtility]::UrlDecode(($filename | select-string ".*(https.*)].*").matches.groups[1].value)
- $output = "soundpostbackup/" + $url.split('/')[-1]
- write-host "Downloading $url to $output"
- invoke-webrequest $url -outfile $output
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement