├── demo.jpg ├── ActionsDemo.png └── README.md /demo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanghaobo/NeteaseCloudMusicDayActions/HEAD/demo.jpg -------------------------------------------------------------------------------- /ActionsDemo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanghaobo/NeteaseCloudMusicDayActions/HEAD/ActionsDemo.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 功能 2 | 利用GithubActions将网易云音乐日推歌曲自动备份到新歌单(无需服务器) 3 | ## 使用步骤 4 | - 在自己的Github上创建个新仓库 5 | - 在仓库创建 /.github/workflows/day.yml 6 | - 将day.yml里面的phone和password里面的xxx替换成自己的网易云账号密码即可 7 | - 第一次创建后等待1小时,以后每小时脚本会自动运行一次进行检测,可在项目上方的Actions里查看运行记录 8 | ## 使用效果 9 | 10 | 11 | 12 | ## day.yml 13 | ```yaml 14 | name: 网易云音乐日推自动创建歌单 15 | 16 | on: 17 | schedule: 18 | # * is a special character in YAML so you have to quote this string 19 | - cron: '0 0/3 * * *' 20 | 21 | jobs: 22 | build: 23 | 24 | runs-on: ubuntu-latest 25 | 26 | steps: 27 | - name: 更新为中国时间 28 | run: | 29 | sudo rm -rf /etc/localtime 30 | sudo ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 31 | date 32 | - name: 安装网易云api 33 | run: git clone https://github.com/shanghaobo/NeteaseCloudMusicApi.git 34 | - name: 运行网易云api 35 | run: | 36 | cd NeteaseCloudMusicApi 37 | npm install 38 | nohup node app.js & 39 | - name: 安装并脚本 40 | run: git clone https://github.com/shanghaobo/NeteaseCloudMusicDay.git 41 | - name: 设置api 42 | run: echo "api='http://127.0.0.1:3000'" >> NeteaseCloudMusicDay/config.py 43 | - name: 设置网易云音乐登录账号 44 | run: echo "phone='xxxxxxxxxxx'" >> NeteaseCloudMusicDay/config.py 45 | - name: 设置网易云音乐登录密码 46 | run: echo "password='xxxxxx'" >> NeteaseCloudMusicDay/config.py 47 | - name: 运行脚本 48 | run: python3 NeteaseCloudMusicDay/main2.py 49 | 50 | ``` --------------------------------------------------------------------------------