Coder Social home page Coder Social logo

cloudmusic-levelup-1's Introduction

CloudMusic-LevelUp-1

网易云音乐刷歌升级脚本,欢迎提 issue 和 PR 帮助增强脚本功能。

项目 GitHub 地址

脚本功能

  1. 登录网易云音乐
  2. 执行签到,并显示奖励的积分数值
  3. 刷音乐播放量,返回具体数值
  4. 使用 GitHub Actions 部署脚本
  5. 支持腾讯云函数部署脚本

使用方式

安装依赖

pip install -r requirements.txt

执行脚本

脚本使用命令行参数输入变量,其中手机号和密码为必填字段,其余均为可选字段。

# python action.py -h 查看usage
usage: action.py [-h] [-s SC_KEY] [-t TG_BOT_KEY TG_BOT_KEY] [-b BARK_KEY] [-w WECOM_KEY WECOM_KEY WECOM_KEY] [-p PUSH_PLUS_KEY] phone password

positional arguments:
  phone                 Your Phone Number.
  password              The plaint text or MD5 value of the password.

optional arguments:
  -h, --help            show this help message and exit
  -s SC_KEY             The SCKEY of the Server Chan.
  -t TG_BOT_KEY TG_BOT_KEY
                        The Token and Chat ID of your telegram bot.
  -b BARK_KEY           The key of your bark app.
  -w WECOM_KEY WECOM_KEY WECOM_KEY
                        Your Wecom ID, App-AgentID and App-Secrets.
  -p PUSH_PLUS_KEY      The token of your pushplus account.

手机号默认国际电话区号为**大陆(+86),如果是海外用户请将手机号字段写为区号+手机号的格式,如852+12343123,国内用户无需此操作。

密码可以为明文或明文的 MD5 值,脚本会自动判断明文密码并进行 MD5 计算。

MD5 值计算可以在MD5 在线加密上进行,取 32 位小写值

示例:

python .\action.py 1xx014x4636 pass123456
python .\action.py 1xx014x4636 1xxx2xx324x65fx6xb22846ea8xcx0x7

执行结果:

image-20210428144956285

多账号

脚本支持多账号,在指定参数时按顺序以,(注意为英文逗号)分割多个账号和密码:

python .\action.py 1xx014x4636,2xx011x4226 1xxx2xx324x65fx6xb22846ea8xcx0x7,2xxx41x324x34fx6xb11546ea4xcx1x2

消息推送

脚本提供了多种消息推送渠道供选择使用,便于用户查看执行结结果。以下多个推送方式可以同时多选使用。

Server 酱 Turbo 推送

使用 Server 酱 Turbo 版可以绑定微信,将脚本每次的运行结果推送到你的微信上。

使用方法:

  1. 访问Server 酱 Turbo 版官网,点击登入,使用微信扫码登录

  2. 登入成功后,按照网站上的说明选择消息通道,如方糖服务号(于 2021 年 4 月停止服务)

  3. 点击SendKey,找到自己的 SendKey,并复制

  4. 执行脚本时带参数-s指定 SendKey

用例:

python action.py [手机号] [32位MD5密码加密值] -s [SendKey]

示例:

python action.py 1xx014x4636 1xxx2xx324x65fx6xb22846ea8xcx0x7 -s SSS111111T111112f3e421

Telegram Bot 推送

使用 Telegram 机器人按时推送脚本执行结果。

使用方法:

  1. 创建 Telegram 机器人并获取机器人 Token 以及个人账户的 Chat ID
  2. 执行脚本时指定参数-t,其后输入 Token 和 Chat ID 两个参数,顺序固定

示例:

python action.py 1xx014x4636 1xxx2xx324x65fx6xb22846ea8xcx0x7 -t 1172135555:AAAABBskKAAAeiE-BBacB1baODj1ccchcMc 1231315343

Bark 推送

使用 Bark App 实现推送(建议 iOS/iPadOS 用户使用)。

使用方法:

  1. 安装 Bark 移动端程序
  2. 复制应用内的示例 URL 并截取其中的 22 位随机字符串
  3. 执行脚本时指定参数-b,后接上述 22 位字符串

示例:

python action.py 1xx014x4636 1xxx2xx324x65fx6xb22846ea8xcx0x7 -b aaaaaaaaaaaaaaaaaaaaaa

pushplus 微信公众号推送

使用pushplus平台进行推送。

使用方法:

  1. 访问pushplus官网,登录
  2. 找到一对一推送,并复制你的token
  3. 执行脚本时指定参数-p,后接上述 token 值

示例:

python action.py 1xx014x4636 1xxx2xx324x65fx6xb22846ea8xcx0x7 -p aaa6aac77dc1111c2d22c2345555242e

企业微信推送

使用方法:

  1. 配置企业微信,获取企业 ID、应用 ID、应用 Secret
  2. 执行脚本时指定参数-w,其后输入企业 ID、应用 ID 和应用 Secrets 三个参数,顺序固定

用例:

python action.py 1xx014x4636 1xxx2xx324x65fx6xb22846ea8xcx0x7 -w [企业ID] [应用ID] [应用Secrets]

GitHub Actions 部署

1. Fork 该仓库

2. 创建 Secrets

  • 创建 PHONE,填入手机号,多账号以,分割(必填)
  • 创建 PASSWORD,填入 32 位 MD5 密码加密值,多账号以,分割(与 PASSWORD_PLAIN 字段二选一)
  • 创建 PASSWORD_PLAIN,填入明文密码,多账号以,分割(与 PASSWORD 字段二选一)
  • 创建 SC_KEY(Server 酱 SendKey,可选)
  • 创建 TG_BOT_KEY(Telegram 机器人推送参数,以空格分割多个参数,可选)
  • 创建 BARK_KEY(Bark 推送参数,可选)
  • 创建 WECOM_KEY (企业微信推送参数,以空格分割多个参数,可选)
  • 创建 PUSH_PLUS_KEY(pushplus 推送参数,可选)

3. 启用 Action

点击 Actions,选择 I understand my workflows, go ahead and enable them

由于 GitHub Actions 的限制,直接 fork 来的仓库不会自动执行!!!

必须手动修改项目提交上去,最简单的方法就是修改下图的 README.md 文件(右侧有网页端编辑按钮)。

image-20201022185210937

随便修改什么都行,修改完 commit 就可以了。

之后每天 0 点会自动执行一次脚本

4. 手动执行

GitHub 有手动执行的功能,点击下图 Run workflow 即可。

5. 多次执行(可选)

如果觉得每天刷的听歌量达不到要求,可以尝试每天多次执行的解决方案,修改 .github/workflows/action.yml 内的 cron 值为 "0 4/16 * * *" ,即在每天的北京时间 0 点和 12 点执行。

腾讯云函数部署

具体步骤参考腾讯云函数部署CloudMusic-LevelUp脚本

注意事项

  • 脚本只支持 Python3 环境
  • 手机号列表和密码列表信息必须按顺序一一对应
  • 网易云音乐限制每天最多计算 300 首
  • 必须手动修改内容,不然不会自动执行!
  • 为了方便他人学习研究,脚本保留了网易云音乐完整的表单加密算法
  • Server 酱的应用场景取决于个人,请跟据自己的需求选择消息通道并进行配置,如在使用和配置方面有疑问,可以提出 Issue 或直接联系 Server Chan 管理员

TODO

  • 脚本功能太少,今后考虑开发比较实用的新功能

联系方式

微信

image

cloudmusic-levelup-1's People

Contributors

secriy avatar lbr77 avatar allinu avatar lll-hy avatar goubo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.