Compare commits

...
6 Commits
Author SHA1 Message Date
shanmite 41b036966e ci: fix pkg.yml 2023-06-29 08:01:24 +08:00
shanmite c282d8492d docs: 更新CHANGELOG 2023-06-28 16:06:23 +08:00
shanmite 5a3c16d20d fix: 专栏获取内容不正确,需要排除推荐内容 (#293)
Fixed #293
2023-06-28 15:28:27 +08:00
shanmite 75383e8faa docs: 更新CHANGELOG 2023-05-16 09:56:09 +08:00
shanmite 29645bc4e7 fixed: 话题搜索功能已失效 #285
Fixed #285
2023-05-16 09:55:08 +08:00
shanmite d950a59b4d fix: is_imitator导致错误评论 2023-05-15 11:24:09 +08:00
5 changed files with 22 additions and 7 deletions
-2
View File
@@ -49,7 +49,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
file: "dist/*.zip"
delete_file: "dist/*.zip"
tag_name: "v2"
overwrite: true
arm64:
@@ -78,6 +77,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
file: "dist/*.zip"
delete_file: "dist/*.zip"
tag_name: "v2"
overwrite: true
+11
View File
@@ -1,5 +1,16 @@
<!-- markdownlint-disable MD036 MD024-->
# CHANGELOG
## 主要变化(2.7.11)
* 5a3c16d fix: 专栏获取内容不正确,需要排除推荐内容 (#293)
_如果之前版本小于上一版本,请查看[CHANGELOG](https://github.com/shanmiteko/LotteryAutoScript/blob/main/CHANGELOG.md)变更说明_
## 主要变化(2.7.10)
* 29645bc fixed: 话题搜索功能已失效 #285
* d950a59 fix: is_imitator导致错误评论
_如果之前版本小于上一版本,请查看[CHANGELOG](https://github.com/shanmiteko/LotteryAutoScript/blob/main/CHANGELOG.md)变更说明_
## 主要变化(2.7.9)
* 3828a0f fix: Cannot read properties of null (#284)
* 67313f4 feat: 专栏里的动态链接识别优化 (#283)
+1 -2
View File
@@ -396,8 +396,7 @@ class Monitor extends Searcher {
|| (hasOfficialLottery && model[0] === '1')
|| (!hasOfficialLottery && model[1] === '1' && has_key_words),
isSendChat =
(is_imitator && lottery_info_type === 'uid' && chatmodel !== '00')
|| (hasOfficialLottery && chatmodel[0] === '1')
(hasOfficialLottery && chatmodel[0] === '1')
|| (!hasOfficialLottery && chatmodel[1] === '1'),
{ blacklist: remote_blacklist } = use_public_blacklist === false
? { blacklist: "" }
+9 -2
View File
@@ -186,6 +186,12 @@ function modifyDynamicRes(res) {
log.warn('处理动态数据', '未找到任何动态信息')
}
if (typeof has_more === "undefined"
&& typeof offset === "undefined") {
log.error('处理动态数据', '该功能已失效');
return null;
}
const
/**
* 字符串offset防止损失精度
@@ -353,6 +359,8 @@ class Searcher {
* @returns {Promise<LotteryInfo[] | null>}
*/
async getLotteryInfoByTag(tag_name) {
log.info('获取动态', `开始获取带话题#${tag_name}#的动态信息`);
const
tag_id = await bili.getTagIDByTagName(tag_name),
hotdy = await bili.getHotDynamicInfoByTagID(tag_id),
@@ -360,7 +368,6 @@ class Searcher {
if (modDR === null) return null;
log.info('获取动态', `开始获取带话题#${tag_name}#的动态信息`);
log.info('获取动态', '成功获取热门动态');
/**
@@ -425,7 +432,7 @@ class Searcher {
continue
}
const
content = await bili.getOneArticleByCv(id),
content = (await bili.getOneArticleByCv(id) || "").split("推荐文章")[0],
dyids = content.match(/[0-9]{18}/g) || [],
short_ids = content.match(/(?<=b23.tv\/)[a-zA-Z0-9]{7}/g) || [],
short_id_set = [...new Set(short_ids)],
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "lottery-auto-script",
"version": "2.7.9",
"version": "2.7.11",
"description": "自动参与B站动态抽奖",
"main": "main.js",
"scripts": {