Batch upload files with Zennoposter

When planning a trip for the weekend the whole family thought that songs from children’s cartoons would be very pleasant on the road. Well, is it really bad to sing something like:

? ๐Ÿ™‚ No sooner said than done!
An interesting resource for donating songs to my iPod was the http://savok.name/ site stages of history. The choice of songs is not bad, but the possibility of batch downloading on the site is not provided ๐Ÿ™

Zennoposter comes to the rescue – I wrote about it earlier, and yet I repeat – a completely unique program that allows you to automate everything that happens in the browser. So the task is simple:
1. Find the link to the file
2. Activate it
3. Save the file to the computer
4. We pass to the first point

Looking at the file saving structure on the specified site, it is clear that it uses a static parameter: http://savok.name/uploads/music/, but the file name has a numerical value. Given that our task is to preserve the entire database of songs – this only makes our task easier.

The scheme of the resulting project is presented below. As you can see, at the very beginning of the project, we set the initial value of the variable responsible for the growth of the numbering of the requested file. Thanks to this, we can download the entire database from the first file.
Important : I did not add verification of the existence of the link, because it is lazy. Therefore, in the event of a dead link, the program will save an empty file on your computer.
sound-downloader-1-1

So, we will consider the general scheme of the bootloader in more detail:
1. Set the initial value of the variable.
2. From their created list, where we put the static value of the link http://savok.name/uploads/music/ we get this link in the form of a variable.
3. Specify the address on the disk where we will save the downloaded files
4. We form a GET request in the form: {-Variable.file -} {- Variable.count -}. Mp3, where {-Variable.file-} is a variable that has the value http://savok.name/uploads/music /, and {-Variable.count-} is the counter value, mp3 is the file extension that does not change.
5. A notification about saving the file is issued.
6. Increase the counter value by 1.
7. We return to paragraph 1.

Thus, our program accesses the link http://savok.name/uploads/music/1.mp3, saves it, increases the counter by one, then saves the second file and then on and on. In fact, the scheme is quite flexible. Nothing prevents us from parsing the original file name, and loading it ๐Ÿ™‚

That’s all.
You can download the project itself via the link ๐Ÿ˜‰

Thanks for your attention! If you have questions, write: oleksiy@lavrynenko.com