metalx1000

Get photo list from Google Photo Album

Apr 15th, 2017
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.41 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. url="https://photos.google.com/share/AF1QipNu_k1gIYsf20zcNxgl3IpsdeRCUJ5mhZSNi-AQTJh02wyxflNipRmtrNsyjjtRhg?key=T0s0WGlISUh0ckE1LVBlQzJXdV9TcXIyQWpmQWt3"
  4. output="1.html"
  5.  
  6. echo "Retrieving photo list..."
  7.  
  8. wget -q "$url" -O-|\
  9.   sed 's/"/\n/g'|\
  10.   grep -v '/a/'|\
  11.   grep -i "lh3"|\
  12.   sort -u|grep "^http"|\
  13. while read url;
  14. do
  15.  echo "<img src='$url'>";
  16. done > $output
  17.  
  18. echo "$output created."
Add Comment
Please, Sign In to add comment