My new project: MusicDL, a simple music downloader
- Posted on March 10, 2018
- in Projects
- Estimated reading time: 6 minutes
Here I'd like to write something about the new project I am developing. It's called MusicDL, and its purpose is simple: it should allow searching, playing and downloading music from different websites. I consider it's heavily inspired by Chris Norman's project, GMP3.
Being honest,I just was taking a little course about web scraping in Python and wanted to apply something of what I have learnt in a simple thing.
Besides scraping, I also wanted to build something with Python 3 and its new tools. I know Python 3 syntax is not so different to Python 2.x, but anyway, it adds some new features and deprecates something we have been using for some ages. Currently, none of my other projects are ready for switching to Python 3. So for now, instead modifying alot of code and writing a script for another module (Py2exe, the module used to build windows executable files from Python programs, is not ready to work in Python 3.6, the latest python 3 stable version), I have decided to build a new, simple project to try a new version of Python, a new windows executable builder and a new module we plan to use in TWBlue, called vlc.
So that's how MusicDL was born. Basically is a little experiment about Python 3 support, WX Python Phoenix (WXPython for Python 3), python-vlc (module for using LibVLC and play some of the audio formats VLC can handle), and pyinstaller (module for creating windows executable files).
At first, I have added a simple module for searching and extracting data from a russian music website, called Zaicev.net. My idea about this program is pretty simple: Every service (I mean, page from where you can extract data and audio files) should go in a separate module. All searching and extracting data logic will be in the same module. When searching, the application should choose the module selected, instantiate it, and add all results provided after executing the search function.
After zaycev.net, I have added youtube support, thanks to youtube-dl. For youtube, audio will be taken in best quality if you want to play the result (usually audio in best quality for videos is stored in webM compatible formats), and when downloading, instead just retrieving the file, MusicDL will attempt to encode the best audio format to mp3. This encoding is thanks to VLC, again.
I just added an auto-updater module, and that was all. The first MusicDL version had been released to the public. I had built two variants, a portable, zipped version, and an installer for the same version as well. They should work in 32 and 64 bits systems, from windows Vista to Windows 10 I guess.
For the second version released (the latest version), I have fixed some issues people had reported, added mail.ru/music and vk; and a Spanish translation. Also, I have written a quick start guide and a changelog, available in the project's page and from the application's menu bar.
Another change in this new version is about the python version used to build it. Before I decided to use the latest available Python 3 version for building this application. It allowed me to use the latest technology available, but dropped support for old windows, especially XP. I have received feedback from some users about not dropping XP support. So I have tried to decrease Python to 3.4, the last supported version for Windows XP. Anyway It didn't work, XP is still not supported (at least it's not confirmed to work properly there), and caused an additional issue. Auto-updater module was refusing updates because python version used in 0.1 does not match to python version for 0.2. So, users should not update the program by using that feature. They should download the new version manually instead. Again, this version is packaged in a portable and installer file.
My plans about MusicDL are still not defined. As I have used it mainly for learning, I am not quite sure what to do with the base code I have written. Firstly, I'd like to support XP in a way that will not affect users of newer Windows versions. Probably I will improve the source code so it will be compatible with both python 2 and 3. For that to work, I think I will need to build it with Pyinstaller for Python 3, and Py2exe for Python 2 (in Python 2.7, Pyinstaller refuses to add everything related to pubsub in the final exe, I think this may be related to This pull request).
Some people have asked me if I will make the source code available in GitHub as I did with other projects (TWBlue, Socializer). Honestly I still don't know. I have been thinking alot about releasing its source code, so others may add more search services to the application and users will be able to download music from more sites. We include Youtube-dl already, wich can download files from about 1000 websites, so we would just need modules for searching and retrieving results from these sites. But also I am not sure if community will do exactly this. But this is more a dilemma about closed vs open source in my mind.