metalx1000

Read Snoopy Comics Online

May 15th, 2021
2,036
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. url="https://www.gocomics.com/peanuts"
  3. read -p "Enter Start Date: " d
  4. d=$(date +%Y/%m/%d -d "$d")
  5.  
  6. read -p "Enter End Date: " end
  7. end=$(date +%Y/%m/%d -d "$end")
  8.  
  9. while [ "$d" != "$end" ];
  10. do
  11.   echo $d
  12.   img="$(wget -qO- "$url/$d"|grep "og:image"|head -n1|cut -d\" -f4)"
  13.   wget -c "$img"
  14.   d=$(date +%Y/%m/%d -d "$d + 1 day")
  15.  
  16. done
  17.  
RAW Paste Data