summaryrefslogtreecommitdiff
path: root/.config/systemd
AgeCommit message (Expand)Author
2021-06-09no reflector systmd servicexyz
2021-06-08commentsxyz
2021-06-08reflector systemd servicexyz
2021-05-19-A for ll, alt for screenshot, archwiki approach for ssh-agentxyz
2021-04-02add ssh-agent.servicexyz
8'>48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
#!/bin/sh
# rewrite TianyiShi2001's python script which rewrite NeteaseCloudMusicApi node.js api
# references:
# https://github.com/ytdl-org/youtube-dl/issues/18051#issuecomment-859964832
# https://github.com/Binaryify/NeteaseCloudMusicApi
# info about encrytion and api: 
# https://github.com/metowolf/NeteaseCloudMusicApi/wiki
# https://github.com/darknessomi/musicbox/wiki

# lan lan, aid=48860966, rid=793052426, example id=1397315179,1817498734
# cheng ruan, aid=46703185, rid=792968433

# trial and error to get dj_max, don't know why, maybe because it is 2^31 and it is the size limit of whatever type of the variable
dj_max=2147483647
dl_urls_tmp="$(mktemp)"
# printf 'e82ckenh8dichen8' | hexdump -ve '/1 "%02x"'
key='653832636b656e683864696368656e38'
url='/api/song/enhance/player/url'
request_id=$(date +'%s%3N')_$(seq -w 1 1000 | shuf -n1)
user_agent='Mozilla/5.0 (Linux; U; Android 9; zh-cn; Redmi Note 8 Build/PKQ1.190616.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/71.0.3578.141 Mobile Safari/537.36 XiaoMi/MiuiBrowser/12.5.22'
cookie="$(printf '"appver":"8.0.0","versioncode":"140","buildver":"1623455100","resolution":"1920x1080","__csrf":"","os":"pc","requestId":"%s"' "$request_id")"

die () 
{