Skip to content

Commit

Permalink
添加[百词斩]领铜板
Browse files Browse the repository at this point in the history
  • Loading branch information
chavyleung committed Mar 6, 2020
1 parent 9d70f60 commit baf54d4
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 52 deletions.
7 changes: 5 additions & 2 deletions QuantumultX_AppStore_Local_Cookie.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 本配置适用于: QuanX 商店版 v1.0.6-build194 及之前版本
# 如果你是TF版, 请使用: QuantumultX_Local_Cookie.conf

hostname = api.everphoto.cn, promotion.waimai.meituan.com, wx.10086.cn, www.maomicd.com, act.10010.com, api-takumi.mihoyo.com, gdws.nsenz.com, credits.bz.mgtv.com, *.csdn.net, wapside.189.cn, *.acfun.cn, apk.tw, *.bilibili.com, api.dongqiudi.com, *.feng.com, www.flyertea.com, music.163.com, *.m.163.com, user.qunar.com, *.rr.tv, *.weixinjia.net, *.smzdm.com, tieba.baidu.com, *.v2ex.com, *.video.qq.com, v.qq.com, mobwsa.ximalaya.com, *.you.163.com, *.rrys2019.com, ios.zmzapi.com
hostname = group.baicizhan.com, api.everphoto.cn, promotion.waimai.meituan.com, wx.10086.cn, www.maomicd.com, act.10010.com, api-takumi.mihoyo.com, gdws.nsenz.com, credits.bz.mgtv.com, *.csdn.net, wapside.189.cn, *.acfun.cn, apk.tw, *.bilibili.com, api.dongqiudi.com, *.feng.com, www.flyertea.com, music.163.com, *.m.163.com, user.qunar.com, *.rr.tv, *.weixinjia.net, *.smzdm.com, tieba.baidu.com, *.v2ex.com, *.video.qq.com, v.qq.com, mobwsa.ximalaya.com, *.you.163.com, *.rrys2019.com, ios.zmzapi.com

# 电信营业厅
^https:\/\/wapside.189.cn:9001\/api\/home\/homeInfo url script-request-header chavyleung/10000/10000.cookie.js
Expand Down Expand Up @@ -92,4 +92,7 @@ https:\/\/www.maomicd.com\/plugin.php\?id=k_misign:sign&operation=qiandao url sc
^https:\/\/promotion.waimai.meituan.com\/playcenter\/signIn\/doaction url script-request-header chavyleung/wmmeituan/wmmeituan.cookie.js

# 时光相册
^https:\/\/api.everphoto.cn\/users\/self\/checkin\/v2 url script-request-header chavyleung/everphoto/everphoto.cookie.js
^https:\/\/api.everphoto.cn\/users\/self\/checkin\/v2 url script-request-header chavyleung/everphoto/everphoto.cookie.js

# 百词斩
^https://group\.baicizhan\.com/group/rewards? url script-request-header bcz.cookie.js
7 changes: 5 additions & 2 deletions QuantumultX_Local_Cookie.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 本配置适用于: QuanX TestFlight v1.0.6-build195 及以后版本
# 如果你是商店版, 请使用: QuantumultX_AppStore_Local_Cookie.conf

hostname = api.everphoto.cn, i.meituan.com, promotion.waimai.meituan.com, wx.10086.cn, www.maomicd.com, act.10010.com, api-takumi.mihoyo.com, m.gdoil.cn, credits.bz.mgtv.com, *.csdn.net, wapside.189.cn, *.acfun.cn, apk.tw, *.bilibili.com, api.dongqiudi.com, *.feng.com, www.flyertea.com, music.163.com, *.m.163.com, user.qunar.com, *.rr.tv, *.weixinjia.net, *.smzdm.com, tieba.baidu.com, *.v2ex.com, *.video.qq.com, v.qq.com, mobwsa.ximalaya.com, *.you.163.com, *.rrys2019.com, ios.zmzapi.com
hostname = group.baicizhan.com, api.everphoto.cn, i.meituan.com, promotion.waimai.meituan.com, wx.10086.cn, www.maomicd.com, act.10010.com, api-takumi.mihoyo.com, m.gdoil.cn, credits.bz.mgtv.com, *.csdn.net, wapside.189.cn, *.acfun.cn, apk.tw, *.bilibili.com, api.dongqiudi.com, *.feng.com, www.flyertea.com, music.163.com, *.m.163.com, user.qunar.com, *.rr.tv, *.weixinjia.net, *.smzdm.com, tieba.baidu.com, *.v2ex.com, *.video.qq.com, v.qq.com, mobwsa.ximalaya.com, *.you.163.com, *.rrys2019.com, ios.zmzapi.com

# 电信营业厅
^https:\/\/wapside.189.cn:9001\/api\/home\/homeInfo url script-request-header chavyleung/10000/10000.cookie.js
Expand Down Expand Up @@ -95,4 +95,7 @@ https:\/\/www.maomicd.com\/plugin.php\?id=k_misign:sign&operation=qiandao url sc
^https:\/\/i.meituan.com\/evolve\/signin\/signpost\/ url script-request-body chavyleung/meituan/meituan.cookie.js

# 时光相册
^https:\/\/api.everphoto.cn\/users\/self\/checkin\/v2 url script-request-header chavyleung/everphoto/everphoto.cookie.js
^https:\/\/api.everphoto.cn\/users\/self\/checkin\/v2 url script-request-header chavyleung/everphoto/everphoto.cookie.js

# 百词斩
^https://group\.baicizhan\.com/group/rewards? url script-request-header bcz.cookie.js
4 changes: 3 additions & 1 deletion QuantumultX_Local_Task.conf
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@
# 美团
7 0 * * * chavyleung/meituan/meituan.js
# 时光相册
7 0 * * * chavyleung/everphoto/everphoto.js
7 0 * * * chavyleung/everphoto/everphoto.js
# 百词斩
0 8-24/4 * * * chavyleung/bcz/bcz.js
9 changes: 6 additions & 3 deletions bcz/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# 百词斩
> 参考chavy签到脚本制作的百词斩领取铜板的脚本

> 参考 chavy 签到脚本制作的百词斩领取铜板的脚本
> 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可
> 不需要手动编辑脚本 (获取 Cookie 和手机号码都由脚本自动完成)
> 感谢 [@AGentleWind](https://github.com/AGentleWind) PR
## 配置 (Surge)

```properties
Expand Down Expand Up @@ -40,7 +43,7 @@ group.baicizhan.com
2. 再配置重写规则:
- Surge: 把两条远程脚本放到`[Script]`
- QuanX: 把`bcz.cookie.js``bcz.js`传到`On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关)
3. 打开 APP 手动签到一次: 访问下右下角 `` > `我的铜板` > `加入百词斩小班` > `去查看` > `我的小班进去 领铜板`
3. 打开 APP 手动签到一次: 访问下右下角 `` > `我的铜板` > `加入百词斩小班` > `去查看` > `我的小班进去 领铜板`
4. 系统提示: `获取Cookie: 成功`
5. 最后就可以把第 1 条脚本注释掉了

Expand Down Expand Up @@ -98,4 +101,4 @@ group.baicizhan.com

[@ConnersHua](https://github.com/ConnersHua)

[@sazs34](https://github.com/sazs34/)
[@AGentleWind](https://github.com/AGentleWind)
18 changes: 9 additions & 9 deletions bcz/bcz.cookie.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
const cookieName = '百词斩领取铜板'
const cookieKey = 'cookie_tb'
const shareKey = `share_key`
const cookieName = '百词斩'
const cookieKey = 'senku_cookie_bcz'
const shareKey = 'senku_key_bcz'
const senku = init()

if (this.$request && this.$request.headers) {
const cookieVal = $request.headers['Cookie']
const url = $request.url
const index1 = url.indexOf('=')
const index2 = url.indexOf('&')
const shareVal = url.substring(index1+1,index2)
if (cookieVal&&shareVal) {
if (senku.setdata(cookieVal,cookieKey)&&senku.setdata(shareVal,shareKey)) {
const url = $request.url
const index1 = url.indexOf('=')
const index2 = url.indexOf('&')
const shareVal = url.substring(index1 + 1, index2)
if (cookieVal && shareVal) {
if (senku.setdata(cookieVal, cookieKey) && senku.setdata(shareVal, shareKey)) {
senku.msg(`${cookieName}`, '获取Cookie: 成功', '')
senku.log(`[${cookieName}] 获取Cookie: 成功, cookie: ${cookieVal}`)
}
Expand Down
64 changes: 29 additions & 35 deletions bcz/bcz.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,42 @@
const cookieName = '百词斩领取铜板'
const cookieKey = 'cookie_tb'
const shareKey = `share_key`
const cookieName = '百词斩'
const cookieKey = 'senku_cookie_bcz'
const shareKey = 'senku_key_bcz'
const senku = init()
const cookieVal = senku.getdata(cookieKey)
const shareVal = senku.getdata(shareKey)

let signinfo = {} //signinfo 对象初始化
let signinfo = {}
senku.log()
check()
// ^https?://app\.xiaoyuan\.ccb\.com/channelManage/outbreak/addOutbreak Cookie: cookieVal
function check(cb) {
const url = { url: `https://group.baicizhan.com/group/apply_reward`, headers: { Cookie: cookieVal } }
url.headers['Content-Type'] = `text/plain;charset=utf-8`
url.headers['User-Agent'] = `Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/7.0.10(0x17000a21) NetType/4G Language/zh_CN`
const key = {share_key:shareVal}
url.body = JSON.stringify(key)
senku.log(url.body)
senku.post(url, (error, response, data) => {
signinfo = JSON.parse(data)

senku.log(JSON.stringify(signinfo))

const title = `${cookieName}`
let subTitle = ``
let detail = ''
if (signinfo.code == 1) {
if (signinfo.data.is_new) {
subTitle += `成功`
detail = `获取铜板数${signinfo.data.reward[2]}`
}
else {
subTitle += `失败(重复签到)`
}
}
else {
detail = `状态: ${signinfo.message}`
subTitle += '失败'
const url = { url: `https://group.baicizhan.com/group/apply_reward`, headers: { Cookie: cookieVal } }
url.headers['Content-Type'] = `text/plain;charset=utf-8`
url.headers['User-Agent'] = `Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/7.0.10(0x17000a21) NetType/4G Language/zh_CN`
const key = { share_key: shareVal }
url.body = JSON.stringify(key)
senku.log(url.body)
senku.post(url, (error, response, data) => {
signinfo = JSON.parse(data)
senku.log(JSON.stringify(signinfo))
const title = `${cookieName}`
let subTitle = ``
let detail = ''
if (signinfo.code == 1) {
if (signinfo.data.is_new) {
subTitle += `成功`
detail = `获取铜板数${signinfo.data.reward[2]}`
} else {
subTitle += `失败(重复签到)`
}
senku.msg(title, subTitle, detail)
senku.done()
})
} else {
detail = `状态: ${signinfo.message}`
subTitle += '失败'
}
senku.msg(title, subTitle, detail)
senku.done()
})
}


function init() {
isSurge = () => {
return undefined === this.$httpClient ? false : true
Expand Down

0 comments on commit baf54d4

Please sign in to comment.