User Tools

Site Tools


dl-cookies

Download using uzbl cookies

There's nothing new, just modified example script for people who want to download stuff from restricted sites and separate it by content-type.

#!/bin/bash
cookies="$XDG_DATA_HOME/uzbl/data/cookies.txt"
WGET="wget --user-agent=Firefox --load-cookies $cookies"
ct=`curl -I -b $cookies $8 2>/dev/null | sed -n 's/.*Content-Type: \([-a-z\/]*\);.*/\1/p'`
if [[ $ct == 'application/x-bittorrent' ]]
then
    cd /mnt/sda3/l29ah/torrents/
    $WGET $8 -O `date +%s`.torrent
else
    cd $HOME/downloads/
    $WGET -c $8
fi
dl-cookies.txt · Last modified: 2016/08/31 14:10 (external edit)