has been listening to Himalaya audio programs online, listening to radio programs to save a lot of time, whether it is on the subway or walking can listen, do not bow to read, also out of the distress of cervical spondylosis. Chinese New Year home I want to listen in the car, found only through the mobile phone playback, the effect is not good, I am on the Internet to find the method of downloading, there are small software on the Internet can be downloaded, but no success, the spirit of their own hands-on and clothed the principle of their own. In simple principle, no use of advanced editing language, direct browser operation, on the code:
$ (". Album_soundlist ul Li"). each (function (i) {var sound_id = $ (this). attr ("sound_id"); var json_url = "http://www.ximalaya.com/tracks/" + sound_id + ". JSON"; $.get (Json_url,function (JSON) {var save_name = json.nickname + "-" + Json.title + ". m4a"; var down_cmd = "wget" + json.play_path_64 + "-o" + save_name Console.log (down_cmd); })})
Less code, under the list page run, get the download command, paste the Linux terminal, lidengkequ. Thunderbolt What does not support renaming, the requirements of a few words can also be flexible. Thanks to Himalaya, the better, the more you can buy their accompanying car.
This article is from my blog blog, so be sure to keep this source http://fabing.blog.51cto.com/1591934/1744856
JS + Shell bulk download Himalaya FM audio