diff --git a/app/common/Douban.js b/app/common/Douban.js index a011fc7b..73a012ca 100644 --- a/app/common/Douban.js +++ b/app/common/Douban.js @@ -1091,13 +1091,13 @@ class Douban { } async search (key) { - const json = await this._getJson('https://movie.douban.com/j/subject_suggest?q=' + encodeURIComponent(key)); + const json = await this._getJson('https://www.douban.com/j/search_suggest?debug=true&q=' + encodeURIComponent(key)); const result = []; - for (const detail of json) { + for (const detail of json.cards.filter(item => item.url?.indexOf('movie') !== -1)) { const item = {}; item.doubanId = this.id; item.title = detail.title; - item.subtitle = detail.sub_title; + item.subtitle = detail.card_subtitle; item.link = detail.url; item.poster = detail.img?.replace(/img\d/, 'img9').replace('s_ratio', 'l_ratio').replace('webp', 'jpg'); item.id = detail.id; diff --git a/app/model/WebhookMod.js b/app/model/WebhookMod.js index 57b2d2a8..af710748 100644 --- a/app/model/WebhookMod.js +++ b/app/model/WebhookMod.js @@ -728,7 +728,7 @@ class WebhookMod { await redis.del('vertex:select:douban'); const keys = []; for (const [index, value] of result.entries()) { - await global.doubanPush.pushWeChat(`${index}: ${value.title} - ${value.year}`, '', value.poster); + await global.doubanPush.pushWeChat(`${index}: ${value.title} - ${value.year}`, value.subtitle || '', value.poster); keys.push({ id: index, text: `${value.title} - ${value.year}` }); } const selectors = [