mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
fix: is_charge_lottery默认false
Some checks failed
Build and push Docker images / docker (push) Has been cancelled
Mirror and run GitLab CI / build (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, linux) (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, macos) (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, win) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (alpine) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (linux) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (linuxstatic) (push) Has been cancelled
Some checks failed
Build and push Docker images / docker (push) Has been cancelled
Mirror and run GitLab CI / build (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, linux) (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, macos) (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, win) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (alpine) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (linux) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (linuxstatic) (push) Has been cancelled
This commit is contained in:
parent
33a1d1a38b
commit
08a6359579
@ -148,6 +148,7 @@ function parseDynamicCard(data) {
|
||||
obj.reserve_id = ditem?.modules?.module_dynamic?.additional?.reserve?.rid || 0;
|
||||
obj.reserve_lottery_text = ditem?.modules?.module_dynamic?.additional?.reserve?.title || '信息丢失';
|
||||
/* 充电抽奖 */
|
||||
obj.is_charge_lottery = false;
|
||||
if (ditem?.modules?.module_dynamic?.additional?.type === 'ADDITIONAL_TYPE_UPOWER_LOTTERY') {
|
||||
obj.is_charge_lottery = true;
|
||||
}
|
||||
@ -184,6 +185,7 @@ function parseDynamicCard(data) {
|
||||
obj.origin_reserve_id = ditem?.orig?.modules?.module_dynamic?.additional?.reserve?.rid || 0;
|
||||
obj.origin_reserve_lottery_text = ditem?.orig?.modules?.module_dynamic?.additional?.reserve?.title || '信息丢失';
|
||||
/* 充电抽奖 */
|
||||
obj.origin_is_charge_lottery = false;
|
||||
if (ditem?.orig?.modules?.module_dynamic?.additional?.type === 'ADDITIONAL_TYPE_UPOWER_LOTTERY') {
|
||||
obj.origin_is_charge_lottery = true;
|
||||
}
|
||||
@ -276,6 +278,7 @@ function oldParseDynamicCard(dynamic_detail_card) {
|
||||
obj.reserve_lottery_text = '信息丢失';
|
||||
}
|
||||
}
|
||||
obj.is_charge_lottery = false;
|
||||
if (extend_json.match(/"":\{"lottery/)) {
|
||||
obj.is_charge_lottery = true;
|
||||
}
|
||||
@ -337,6 +340,7 @@ function oldParseDynamicCard(dynamic_detail_card) {
|
||||
obj.origin_reserve_lottery_text = '信息丢失';
|
||||
}
|
||||
}
|
||||
obj.origin_is_charge_lottery = false;
|
||||
if (origin_extend_json.match(/"":\{"lottery/)) {
|
||||
obj.origin_is_charge_lottery = true;
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ const util = require('./util');
|
||||
const d_storage = require('../lib/helper/d_storage');
|
||||
|
||||
(async () => {
|
||||
await util.par_run([0], [
|
||||
await util.par_run([], [
|
||||
// 0
|
||||
async () => {
|
||||
assert(await d_storage.searchDyid('1234567901234568'));
|
||||
|
||||
@ -4,15 +4,17 @@ const searcher = require('../lib/core/searcher');
|
||||
const util = require('./util');
|
||||
|
||||
(async () => {
|
||||
await util.par_run([], [
|
||||
await util.par_run([0, 1], [
|
||||
// 0
|
||||
async () => {
|
||||
let info = await bili_client.getOneDynamicByDyid('728424890210713624');
|
||||
assert(searcher.parseDynamicCard(info).is_charge_lottery);
|
||||
info = await bili_client.getOneDynamicByDyid('1143258210499559428');
|
||||
assert(searcher.parseDynamicCard(info).is_charge_lottery);
|
||||
},
|
||||
// 1
|
||||
async () => {
|
||||
let info = await bili_client.getOneDynamicByDyid('768874900850999300');
|
||||
let info = await bili_client.getOneDynamicByDyid('1150096953788334085');
|
||||
assert(searcher.parseDynamicCard(info).origin_is_charge_lottery);
|
||||
},
|
||||
// 2
|
||||
|
||||
Loading…
Reference in New Issue
Block a user