Skip to content

Commit

Permalink
Merge pull request #612 from DIYgod/master
Browse files Browse the repository at this point in the history
[pull] master from diygod:master
  • Loading branch information
pull[bot] authored Dec 3, 2022
2 parents 019b7af + 96e9ae2 commit c46f327
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ updates:
labels:
- dependencies
ignore:
- dependency-name: fanfou-sdk
versions: ['>=5.0.0']
- dependency-name: got
versions: ['>=12.0.0']
- dependency-name: ip-regex
versions: ['>=5.0.0']
- dependency-name: parse-torrent
versions: ['>=10.0.0']
- dependency-name: remark
versions: ['>=14.0.0']
- dependency-name: remark-frontmatter
Expand Down
14 changes: 13 additions & 1 deletion lib/v2/bangumi/tv/group/reply.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ module.exports = async (ctx) => {
date: $el.children().first().find('small').children().remove().end().text().slice(3),
};
});
const latestSubReplies = $('.sub_reply_bg')
.toArray()
.map((el) => {
const $el = $(el);
return {
id: $el.attr('id'),
author: $el.find('.userName .l').text(),
content: $el.find('.cmt_sub_content').html(),
date: $el.children().first().find('small').children().remove().end().text().slice(3),
};
});
const finalLatestReplies = latestReplies.concat(latestSubReplies).sort((a, b) => (a.id < b.id ? 1 : -1));

const postTopic = {
title,
Expand All @@ -34,7 +46,7 @@ module.exports = async (ctx) => {
title: `${title}的最新回复`,
link,
item: [
...latestReplies.map((c) => ({
...finalLatestReplies.map((c) => ({
title: `${c.author} 回复了小组话题《${title}》`,
description: c.content,
pubDate: timezone(parseDate(c.date), +8),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"request-promise-native": "1.0.9",
"staged-git-files": "1.3.0",
"string-width": "4.2.3",
"supertest": "6.3.1",
"supertest": "6.3.2",
"tosource": "2.0.0-alpha.3",
"unified": "9.2.2",
"vuepress": "1.9.7",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13059,10 +13059,10 @@ superagent@^8.0.3:
qs "^6.11.0"
semver "^7.3.8"

supertest@6.3.1:
version "6.3.1"
resolved "https://registry.yarnpkg.com/supertest/-/supertest-6.3.1.tgz#a8ad362fc6f323c88730ac191ce30427dc869088"
integrity sha512-hRohNeIfk/cA48Cxpa/w48hktP6ZaRqXb0QV5rLvW0C7paRsBU3Q5zydzYrslOJtj/gd48qx540jKtcs6vG1fQ==
supertest@6.3.2:
version "6.3.2"
resolved "https://registry.yarnpkg.com/supertest/-/supertest-6.3.2.tgz#7780b4b85bb2ea675c05b5cb80fa52f4dbe5a52b"
integrity sha512-mSmbW/sPpBU6K8w8189ZiHdc62zMe7dCHpC2ktS9tc0/d2DN0FaxNbDJJNFknZD4jCrGJpxkiFoVyemvKgOdwA==
dependencies:
methods "^1.1.2"
superagent "^8.0.3"
Expand Down

1 comment on commit c46f327

@vercel
Copy link

@vercel vercel bot commented on c46f327 Dec 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.