We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
不添加序号的话,下载下来的顺序是乱的。按时间排序有时候都不是顺序的。
The text was updated successfully, but these errors were encountered:
You can do it by adding just 3 lines of code.
fetch_track_by_ids()
fetch_track_by_id()
# param track_id track_id fetch_track_by_ids() { local count=0 for id in $@; do count=$((count + 1)) fetch_track_by_id $id $count done }
# param track_id fetch_track_by_id() { count=$2 result=`curl -s "http://mobile.ximalaya.com/v1/track/baseInfo?device=iPhone&trackId=$1"|grep title` if [ -n "$result" ];then uid=`echo $result|decode_json uid|sed 's/\"//g'` title=`echo $result|decode_json title|sed 's/\"//g'` url64=`echo $result|decode_json playUrl64|sed 's/\"//g'|sed 's/\\\//g'` if [ -n "$url64" ];then title=`echo $title|sed 's/\.//g'|sed 's/\///g'` echo "fetching $title ..." echo "$url64" # wget "$url64" -O "$dst_dir/$count-$title.mp3" curl -s "$url64" -o "$dst_dir/$count-$title.mp3" else error "Failed to fetch the track, may be a paid resource." fi else error "The trackId $1 does not exist." fi }
You can still use wget, however, I don't have wget on my Mac, so I changed the download tool to curl.
Sorry, something went wrong.
No branches or pull requests
不添加序号的话,下载下来的顺序是乱的。按时间排序有时候都不是顺序的。
The text was updated successfully, but these errors were encountered: