Guest User

Untitled

a guest
Feb 2nd, 2014
1,670
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.55 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. sought_for_id=$1
  4.  
  5. groups=( 28627911 39728801 45064245 36618389 51211972 35075445 )
  6.  
  7. if [[ $# ]]
  8. then
  9.     for i in $groups; do
  10.         for j in `wget -qO - "https://api.vk.com/method/photos.getAlbums?gid=$i" | tr "},{" "\n" | grep aid | cut -f2 -d: | sort | uniq`; do
  11.             wget -qO - "https://api.vk.com/method/photos.get?gid=$i&aid=$j" | tr "},{" "\n" | grep -E "(user_id)|src()" | tr "\n" " " | sed -ne 's/\(\"user_id\"\)/\n\1/pg' | grep $sought_for_id | tr "\"" "\n" | grep http | sed -ne "s'\\\/'/'pg" | tee /dev/tty | wget -qi -;
  12.         done;
  13.     done;
  14. fi
Advertisement
Add Comment
Please, Sign In to add comment