fant0men

Get all Linux Journal issues as PDFs

Aug 9th, 2019
245
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. curl https://secure2.linuxjournal.com/pdf/dljdownload.php -o linuxjournal.html
  2. cat linuxjournal.html | grep -nE "download.linuxjournal.com.*=pdf-[0-9]{3}-" | while read line; do pdf=$(echo "$line" | sed 's/^[0-9]+://' | cut -d'"' -f2); n=$(echo "$line" | cut -d':' -f1); n2=$(( n - 3 )); name=$(sed -n "${n2}p" linuxjournal.html | grep -ioE "[a-z]+.?[0-9]{4}"); wget -O "${name}.pdf" "${pdf}&action=spit"; done
RAW Paste Data