Somusic下载地址:Somusic下载地址
Somusic中文版文档:Somusic中文版文档
此项目全部内容已开源,仅用于学习交流,切勿用于商业用途,否则后果自负
This is the command line music downloader,which contains lots of functions such as search song and mv from kugou website、download song and mv with single or batch.、list search songs or mvs、show download songs or mvs .Above functions have matching commands.You can use help or h to find doc.Finally there left a function that is play music and play mv.I will complete this function in the near future.
- If you want to learn golang quickly with a practical project;
- If you want to get a better understand about how the command line software is runned;
- If you want to enter the Network Spider World quickly;
- If you are interested in the music website,and you want to build yourself music player;
- this project is absolutely nice for you.
- Spider the Kugou Music Website by Golang language.
- Concurrnet download the file(including not only mp3 file and mp4 file,but also binary files and text files.) by Golang goroutine and Channel.
- Master skills of JSON and Golang struct、 interface、http、regexp and Golang basic knowledge.
- Practice to use the famous librarys such as:goquery、gjson...
- Understand how the command line tool is working. Such as windows cmd、Golang Web Framework beego's bee tool.
- Analysis the Http's Interface about Kugou Music Website.
- Get the skill of Spider by Golang.
- create a directory which is used to store the project.for example:
cd d:\golang\workspace\.
- you should execute this command
git clone https://github.com/jaydenwen123/Somusic.git
- if you want to move this project into %gopath%,then you can move it to your gopath's src directory.
Now this will retrieve the project to your local directory, you can start your travel.
1.the somusic support many functions which also can match with it's command. there are all supported functions listed in the table.
Command | Parameter | Function | Description |
---|---|---|---|
gboard | no paramter | download rank board | download the kugou rank board all song |
lsong | [max songid] or | list searched songs | show the asc range musics list(note:the shown songs is not downloaded) |
lmv | [max mvid] or | list searched mvs | show the asc range mv list,it's also like lsong. |
gsong | [songid] or <first1-end1,first2-end2...> or <songid1,...,first1-end1,songid2,songid3...> | get or download songs from remote server | download one music or download according the range.it support download single song、batch(first-end) songs 、 discontinuous(songid1,songid5,songid8,...) songs and mixed above all ways |
gmv | [mvid] or <first1-end1,first2-end2...> or <mvid1,...,first1-end1,mvid5,mvid7...> | download mv files with many ways | gmv usage is also familiar with gsong.you can also see gsong's usage |
psong | [songid] | play the selected song | this function is just not completed.it will fill in the near future |
pmv | [mvid] | play the selected mv | this function is just not completed.it will fill in the near future |
qsong | [keyword] | query song | query song with the inputed keyword from the kugou music website |
qmv | [keyword] | query song | query mv with the inputed keyword from the kugou music website |
ssong | no paramter | show all downloaded local songs | show the downloaded songs list,the songid you can use to play song in the list |
smv | no paramter | show all downloaded local mvs | this comamnd's usage is similiar to the ssong.you can also see ssong. |
chstyle | [new style string] | change the style | change the style with the new style string.this's command is same to the command style . |
style | [new style string] | change the style | change the style with new style string. |
chdelimiter | [new delimiter chars] | change the delimiter chars | it will change the old delimiter chars. |
delimiter | [new delimiter chars] | change the delimiter chars | it will change the old delimiter chars.this command function is same to the command chdelimiter |
mvpath | no paramter | show current downloaded mvpath | show the save downloaded mvpath |
songpath | no paramter | show current downloaded songpath | show the save downloaded songpath |
chmvpath | [newmvpath] | change the current mvpath | change the save downloaded mv path. Use the ~ to recovery the default dirctory |
chsongpath | [newsongpath] | change the current songpath | change the save downloaded song path. Use the ~ to recovery the default dirctory |
help or h | no paramter | show help doc | show the help information |
quit or CTRL+C | no paramter | quit the program | quit the program |
exit or CTRL+C | no paramter | quit the program | quit the program |
cls or clear | no paramter | clear the log information | clear the log information.In current version,it is only support the windows clear log.next version will add the linux clear log function |
2.the following is the picture of help document,which is runned int the goland ide.
In this section. I will use the search song keyword:bigbig
and 天使的翅膀
, and the search mv keyword :Falling Down
and 小幸运
as the example to show how to use the somusic program.
1.search song with keyword.
2.search mv with keyword.
command:
qmv falling down
(falling down) command:qmv 小幸运
(小幸运)
3.list the searched song information.
command:
lsong
(小幸运) command:lsong 11
(big big world) command:lsong
(天使的翅膀)
4.list the searched mv informtion.
5.download the searched song.
6.download the searched mv.
7.show the local downloaded songs.
command:
ssong
![ssong](https://github.com/jaydenwen123/Somusic/blob/master/usages/ssong .png)
8.show the local donwloaded mvs.
9.show the current saved download songs' directory.
10.show the current saved download mvs' directory.
11.change the saved download mvs' directory.
12.change the saved download mvs' directory.
13.change the program command line style.
14.change the program command line delimiter.
15.show or find the help document.
16.quit or exit the program.
17.clear the log information.
- gjson(https://github.com/tidwall/gjson)
- goquery(https://github.com/PuerkitoBio/goquery)
- gorm(https://github.com/jinzhu/gorm)
- beego orm(https://github.com/astaxie/beego/orm)
- beego logs(https://github.com/astaxie/beego/logs)
- regexp standard library(https://studygolang.com/pkgdoc)
- net/http standard library(https://studygolang.com/pkgdoc)
- channel&goroutine(https://gobyexample.com)
- 1.play song or play mv in reality.
- 2.config the variables into the file.such as save download song directory and mv directory,software command line style and delimiter.
- 3.add the cache module.which can improve the somusic's performance.