First the story, which is quite a pull on miniature topic.
So your music collection is Vkontakte, and you wanted her to pull to hard as I wanted. The bulk of the offer on the Internet solutions — all sorts of left utility under Win, which need to feed data to your account (yep, someone to give them on a silver platter). These utility to each song add the button "download", offering (again) a stupid manual labor.
On the web was found to have the following script:
#!/bin/bashgets=`curl -s --data "email=yourmailhere@some.mail&pass=yourpassword" http://login.vk.com/?act=login | egrep -o \\([a-z]\\|[0-9]\\){20\\,}`curl-v --cookie-jar /tmp/vkcookie --data "s=$gets&op=slogin&redirect=1&expire=0&to=0" http://vkontakte.ru/login.phpcurl-v --cookie /tmp/vkcookie vkontakte.ru/audio.php | grep -o 'http.*mp3' | wget-i -* This source code was highlighted with Source Code Highlighter.
This script is just 3 lines pull the music from the page "audio" user. Instead of lines
vkontakte.ru/audio.php
you can enter any wcontactos link, for example, on the page "recordings" of any group (I checked, it works).
And now a question, or rather request to knowing people — help to bring the script to mind.The fact that the music he keeps in files with names fd8787fdsf98.mp3 (with tags!), and if at some point communication was lost, or hung wget, or you accidentally closed the terminal will either have to deal with sorting out the "stolen" for the purpose of removing from the records Vkontakte songs that have already been downloaded, or to download all over again. Neustra and shakes it — I'm not special in the settings wget', but even the Manager downloads Opera gives used
onmost speed.
That is, you need to add a check whether the file already downloaded.
Among other things, I'm not entirely sure the script goes where-beyond the first page with a list of music to check this fact were not taken, for too long, it shakes even the first page.
It would be nice to have any interface using zenity or gxmessage — to drive account information in the window, and not to include in the body of the script, since the latter is unsafe (I nearly published a script with my username and password, if that). Well, the source selection page of the user audio recordings, or records of any group (enough to pass the script only the GID to form a link), or enter the entire address manually (for example, a link on someone's wall where you want to get laid music). In the process of grabbing, you can issue a completion of downloading of the music via notify-send, or use the progress bar to zenity.
Maybe this problem someone from the Linux guru interested?
PS the original script is not my work,
authorship is difficult to specify found on the web
here and is obviously a collective work.