Skip to content

Instantly share code, notes, and snippets.

@vtols
Created August 24, 2012 05:59
Show Gist options
  • Save vtols/3446246 to your computer and use it in GitHub Desktop.
Save vtols/3446246 to your computer and use it in GitHub Desktop.
Test
#!/bin/bash
echo -n 'EMail: '
read MAIL
echo -n 'Password: '
stty -echo
read PASS
stty echo
curl -c cookie "vk.com/login.php?email=$MAIL&pass=$PASS"
USER_ID=$(curl -b cookie 'vk.com/feed' | grep -oE 'events_queue([0-9]+)' | sed 's/events_queue//')
JSON_AUDIO=$(curl -b cookie --data "act=load_audios_silent&al=1&edit=0&gid=0&id=$USER_ID" "vk.com/audio")
JSON_AUDIO=$(echo $JSON_AUDIO | iconv -f WINDOWS-1251 -t UTF-8)
AUDIO_LIST=$(echo $JSON_AUDIO | grep -oE 'http://.{1,60}\.mp3')
wget $AUDIO_LIST -nc
rm cookie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment