From bbee9f247dc91d233735973ed367cf7cb907440a Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Mon, 25 Dec 2023 23:14:21 +0800 Subject: [PATCH 1/9] =?UTF-8?q?feat(route):=20=E6=96=B0=E5=A2=9E=20bing=20?= =?UTF-8?q?=E6=90=9C=E7=B4=A2;=20=E8=BF=81=E7=A7=BB=20bing=20=E6=AF=8F?= =?UTF-8?q?=E6=97=A5=E5=9B=BE=E7=89=87=E5=88=B0=20v2;=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20=E7=99=BE=E5=BA=A6=E6=90=9C=E7=B4=A2;=20=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=20=E6=90=9C=E7=8B=97=E7=89=B9=E8=89=B2LOGO=20=E5=88=B0=20v2=20?= =?UTF-8?q?=E8=A7=84=E8=8C=83=EF=BC=9B=E6=B7=BB=E5=8A=A0=20=E6=90=9C?= =?UTF-8?q?=E7=8B=97=E6=90=9C=E7=B4=A2=EF=BC=9B=E6=B7=BB=E5=8A=A0=20Google?= =?UTF-8?q?=20Search=20(#13936)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(route): 修复 米游社 公告栏 template 错误 * feat(route): 新增 bing 搜索 * docs: Update other.mdx * docs: fix docs * feat(route): 新增 百度搜索 * fix(route): 修复 pubDate 解析错误 * fix(route): 优化 百度搜索的缓存,减轻反爬问题 * feat(route): 新增 360 搜索 * feat(route): 迁移 搜狗特色LOGO 到 v2 规范;添加 搜狗搜索 * fix(route): 百度搜索增加图片 * feat(route): 新增 Google Search * fix(route): 修复 百度搜索相关问题 * fix(route): 修复 Google 相关问题 * fix(route): 修复 360 搜索 * fix(route): 修复 搜狗搜索 * fix(route): 修复 await 问题 * fix: 移除 google sites * fix(route): 修复 缓存和过滤逻辑问题 * fix(route): 修复 360 搜索缺少 cookie 的问题 * fix(route): 修复 360 搜索 cookie 的问题 * feat(route): 移除 so.com 路由 * fix: merge conflict --------- --- lib/router.js | 4 +- lib/v2/baidu/maintainer.js | 1 + lib/v2/baidu/radar.js | 13 +++- lib/v2/baidu/router.js | 1 + lib/v2/baidu/search.js | 54 ++++++++++++++++ lib/v2/baidu/templates/description.art | 6 ++ .../index.js => v2/bing/daily-wallpaper.js} | 9 ++- lib/v2/bing/maintainer.js | 4 ++ lib/v2/bing/radar.js | 22 +++++++ lib/v2/bing/router.js | 4 ++ lib/v2/bing/search.js | 28 +++++++++ lib/v2/google/maintainer.js | 1 + lib/v2/google/radar.js | 12 ++++ lib/v2/google/router.js | 1 + lib/v2/google/search.js | 62 +++++++++++++++++++ lib/v2/google/templates/description.art | 6 ++ lib/{routes => v2}/sogou/doodles.js | 0 lib/v2/sogou/maintainer.js | 4 ++ lib/v2/sogou/radar.js | 16 +++++ lib/v2/sogou/router.js | 4 ++ lib/v2/sogou/search.js | 54 ++++++++++++++++ lib/v2/sogou/templates/description.art | 6 ++ website/docs/routes/other.mdx | 24 ++++++- website/docs/routes/picture.mdx | 4 +- 24 files changed, 327 insertions(+), 13 deletions(-) create mode 100644 lib/v2/baidu/search.js create mode 100644 lib/v2/baidu/templates/description.art rename lib/{routes/bing/index.js => v2/bing/daily-wallpaper.js} (78%) create mode 100644 lib/v2/bing/maintainer.js create mode 100644 lib/v2/bing/radar.js create mode 100644 lib/v2/bing/router.js create mode 100644 lib/v2/bing/search.js create mode 100644 lib/v2/google/search.js create mode 100644 lib/v2/google/templates/description.art rename lib/{routes => v2}/sogou/doodles.js (100%) create mode 100644 lib/v2/sogou/maintainer.js create mode 100644 lib/v2/sogou/radar.js create mode 100644 lib/v2/sogou/router.js create mode 100644 lib/v2/sogou/search.js create mode 100644 lib/v2/sogou/templates/description.art diff --git a/lib/router.js b/lib/router.js index 5958b06b04..9ba588b478 100644 --- a/lib/router.js +++ b/lib/router.js @@ -376,7 +376,7 @@ router.get('/autotrader/:query', lazyloadRouteHandler('./routes/autotrader')); router.get('/geekpark/breakingnews', lazyloadRouteHandler('./routes/geekpark/breakingnews')); // 搜狗 -router.get('/sogou/doodles', lazyloadRouteHandler('./routes/sogou/doodles')); +// router.get('/sogou/doodles', lazyloadRouteHandler('./routes/sogou/doodles')); // 香港天文台 router.get('/hko/weather', lazyloadRouteHandler('./routes/hko/weather')); @@ -690,7 +690,7 @@ router.get('/digitaling/articles/:category/:subcate?', lazyloadRouteHandler('./r router.get('/digitaling/projects/:category', lazyloadRouteHandler('./routes/digitaling/project')); // Bing壁纸 -router.get('/bing', lazyloadRouteHandler('./routes/bing/index')); +// router.get('/bing', lazyloadRouteHandler('./routes/bing/index')); // AlgoCasts router.get('/algocasts', lazyloadRouteHandler('./routes/algocasts/all')); diff --git a/lib/v2/baidu/maintainer.js b/lib/v2/baidu/maintainer.js index 7cbf506d11..b196204cb6 100644 --- a/lib/v2/baidu/maintainer.js +++ b/lib/v2/baidu/maintainer.js @@ -1,5 +1,6 @@ module.exports = { '/gushitong/index': ['CaoMeiYouRen'], + '/search/:keyword': ['CaoMeiYouRen'], '/tieba/forum/good/:kw/:cid?/:sortBy?': ['u3u'], '/tieba/forum/:kw/:sortBy?': ['u3u'], '/tieba/post/:id': ['u3u'], diff --git a/lib/v2/baidu/radar.js b/lib/v2/baidu/radar.js index 20b2b9e809..5d91512855 100644 --- a/lib/v2/baidu/radar.js +++ b/lib/v2/baidu/radar.js @@ -1,6 +1,17 @@ module.exports = { 'baidu.com': { _name: '百度', + www: [ + { + title: '搜索', + docs: 'https://docs.rsshub.app/routes/other#bai-du-sou-suo', + source: ['/'], + target: (params, url) => { + const keyword = new URL(url).searchParams.get('wd'); + return `/baidu/search/${keyword}`; + }, + }, + ], gushitong: [ { title: '首页指数', @@ -73,7 +84,7 @@ module.exports = { top: [ { title: '热搜榜单', - docs: 'https://docs.rsshub.app/routes/other#bai-du-re-sou', + docs: 'https://docs.rsshub.app/routes/other#bai-du-re-sou-bang-dan', source: ['/board'], target: (_, url) => `/baidu/top/${new URL(url).searchParams.get('tab')}`, }, diff --git a/lib/v2/baidu/router.js b/lib/v2/baidu/router.js index e838568aab..3ccdbd2025 100644 --- a/lib/v2/baidu/router.js +++ b/lib/v2/baidu/router.js @@ -1,5 +1,6 @@ module.exports = (router) => { router.get('/gushitong/index', require('./gushitong')); + router.get('/search/:keyword', require('./search')); router.get('/tieba/forum/good/:kw/:cid?/:sortBy?', require('./tieba/forum')); router.get('/tieba/forum/:kw/:sortBy?', require('./tieba/forum')); router.get('/tieba/post/:id', require('./tieba/post')); diff --git a/lib/v2/baidu/search.js b/lib/v2/baidu/search.js new file mode 100644 index 0000000000..6c8def76a5 --- /dev/null +++ b/lib/v2/baidu/search.js @@ -0,0 +1,54 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); +const { art } = require('@/utils/render'); +const path = require('path'); +const renderDescription = (description, images) => art(path.join(__dirname, './templates/description.art'), { description, images }); +const config = require('@/config').value; + +module.exports = async (ctx) => { + const { keyword } = ctx.params; + const url = `https://www.baidu.com/s?wd=${encodeURIComponent(keyword)}`; + const key = `baidu-search:${url}`; + + const items = await ctx.cache.tryGet( + key, + async () => { + const response = (await got(url)).data; + const visitedLinks = new Set(); + const $ = cheerio.load(response); + const contentLeft = $('#content_left'); + const containers = contentLeft.find('.c-container'); + return containers + .map((i, el) => { + const element = $(el); + const link = element.find('h3 a').first().attr('href'); + if (link && !visitedLinks.has(link)) { + visitedLinks.add(link); + const imgs = element + .find('img') + .map((_j, _el) => $(_el).attr('src')) + .toArray(); + const description = element.find('.c-gap-top-small [class^="content-right_"]').first().text() || element.find('.c-row').first().text() || element.find('.cos-row').first().text(); + return { + title: element.find('h3').first().text(), + description: renderDescription(description, imgs), + link: element.find('h3 a').first().attr('href'), + author: element.find('.c-row .c-color-gray').first().text() || '', + }; + } + return null; + }) + .toArray() + .filter((e) => e?.link); + }, + config.cache.routeExpire, + false + ); + + ctx.state.data = { + title: `${keyword} - 百度搜索`, + description: `${keyword} - 百度搜索`, + link: url, + item: items, + }; +}; diff --git a/lib/v2/baidu/templates/description.art b/lib/v2/baidu/templates/description.art new file mode 100644 index 0000000000..5f98f4ca33 --- /dev/null +++ b/lib/v2/baidu/templates/description.art @@ -0,0 +1,6 @@ +{{@ description }} +{{if images}} + {{each images}} + + {{/each}} +{{/if}} diff --git a/lib/routes/bing/index.js b/lib/v2/bing/daily-wallpaper.js similarity index 78% rename from lib/routes/bing/index.js rename to lib/v2/bing/daily-wallpaper.js index cf69bda81c..2eaf345ff3 100644 --- a/lib/routes/bing/index.js +++ b/lib/v2/bing/daily-wallpaper.js @@ -1,22 +1,21 @@ const got = require('@/utils/got'); -const queryString = require('query-string'); module.exports = async (ctx) => { const response = await got({ method: 'get', prefixUrl: 'https://cn.bing.com', url: 'HPImageArchive.aspx', - searchParams: queryString.stringify({ + searchParams: { format: 'js', idx: 0, - n: 7, + n: ctx.query.limit ? parseInt(ctx.query.limit, 10) : 7, mkt: 'zh-CN', - }), + }, }); const data = response.data; ctx.state.data = { title: 'Bing每日壁纸', - link: `https://cn.bing.com/`, + link: 'https://cn.bing.com/', item: data.images.map((item) => ({ title: item.copyright, description: ``, diff --git a/lib/v2/bing/maintainer.js b/lib/v2/bing/maintainer.js new file mode 100644 index 0000000000..e20ecae190 --- /dev/null +++ b/lib/v2/bing/maintainer.js @@ -0,0 +1,4 @@ +module.exports = { + '/': ['FHYunCai'], + '/search/:keyword': ['CaoMeiYouRen'], +}; diff --git a/lib/v2/bing/radar.js b/lib/v2/bing/radar.js new file mode 100644 index 0000000000..9023c3cf4b --- /dev/null +++ b/lib/v2/bing/radar.js @@ -0,0 +1,22 @@ +module.exports = { + 'bing.com': { + _name: 'Bing', + cn: [ + { + title: '每日壁纸', + docs: 'https://docs.rsshub.app/routes/picture#bing', + source: '/', + target: '/bing', + }, + { + title: '搜索', + docs: 'https://docs.rsshub.app/routes/other#bing', + source: '/', + target: (params, url) => { + const q = new URL(url).searchParams.get('q'); + return `/bing/search/${q}`; + }, + }, + ], + }, +}; diff --git a/lib/v2/bing/router.js b/lib/v2/bing/router.js new file mode 100644 index 0000000000..da2dfe81c1 --- /dev/null +++ b/lib/v2/bing/router.js @@ -0,0 +1,4 @@ +module.exports = function (router) { + router.get('/', require('./daily-wallpaper')); + router.get('/search/:keyword', require('./search')); +}; diff --git a/lib/v2/bing/search.js b/lib/v2/bing/search.js new file mode 100644 index 0000000000..41c021da78 --- /dev/null +++ b/lib/v2/bing/search.js @@ -0,0 +1,28 @@ +const parser = require('@/utils/rss-parser'); +const { parseDate } = require('@/utils/parse-date'); +const dayjs = require('dayjs'); +const localizedFormat = require('dayjs/plugin/localizedFormat'); +require('dayjs/locale/zh-cn'); +dayjs.extend(localizedFormat); + +module.exports = async (ctx) => { + const q = ctx.params.keyword; + const searchParams = new URLSearchParams({ + format: 'rss', + q, + }); + const url = new URL('https://cn.bing.com/search'); + url.search = searchParams.toString(); + const data = await parser.parseURL(url.toString()); + ctx.state.data = { + title: data.title, + link: data.link, + description: data.description + ' - ' + data.copyright, + image: data.image.url, + item: data.items.map((e) => ({ + ...e, + description: e.content, + pubDate: parseDate(e.pubDate, 'dddd, DD MMM YYYY HH:mm:ss [GMT]', 'zh-cn'), + })), + }; +}; diff --git a/lib/v2/google/maintainer.js b/lib/v2/google/maintainer.js index cbdd6ddd34..6abbdd362c 100644 --- a/lib/v2/google/maintainer.js +++ b/lib/v2/google/maintainer.js @@ -6,6 +6,7 @@ module.exports = { '/fonts/:sort?': ['Fatpandac'], '/news/:category/:locale': ['zoenglinghou'], '/scholar/:query': ['HenryQW'], + '/search/:keyword/:language?': ['CaoMeiYouRen'], '/sites/:id': ['hoilc'], '/sites/recentChanges/:id': ['nczitzk'], }; diff --git a/lib/v2/google/radar.js b/lib/v2/google/radar.js index 11a15acbb6..998151b5ba 100644 --- a/lib/v2/google/radar.js +++ b/lib/v2/google/radar.js @@ -1,6 +1,18 @@ module.exports = { 'google.com': { _name: '谷歌', + www: [ + { + title: '搜索', + docs: 'https://docs.rsshub.app/routes/other#google', + source: '/', + target: (params, url, document) => { + const q = new URL(url).searchParams.get('q'); + const lang = document.documentElement.lang; + return `/google/search/${q}/${lang}`; + }, + }, + ], chrome: [ { title: '插件更新', diff --git a/lib/v2/google/router.js b/lib/v2/google/router.js index b3064cf1cc..b4f2327971 100644 --- a/lib/v2/google/router.js +++ b/lib/v2/google/router.js @@ -6,4 +6,5 @@ module.exports = function (router) { router.get('/fonts/:sort?', require('./fonts')); router.get('/news/:category/:locale', require('./news')); router.get('/scholar/:query', require('./scholar')); + router.get('/search/:keyword/:language?', require('./search')); }; diff --git a/lib/v2/google/search.js b/lib/v2/google/search.js new file mode 100644 index 0000000000..da45fb8868 --- /dev/null +++ b/lib/v2/google/search.js @@ -0,0 +1,62 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); +const { art } = require('@/utils/render'); +const path = require('path'); +const config = require('@/config').value; + +const renderDescription = (description, images) => art(path.join(__dirname, './templates/description.art'), { description, images }); + +module.exports = async (ctx) => { + const { keyword, language } = ctx.params; + const searchParams = new URLSearchParams({ + q: keyword, + }); + const tempUrl = new URL('https://www.google.com/search'); + tempUrl.search = searchParams.toString(); + const url = tempUrl.toString(); + const key = `google-search:${language}:${url}`; + const items = await ctx.cache.tryGet( + key, + async () => { + const response = ( + await got(url, { + headers: { + 'Accept-Language': language, + }, + }) + ).data; + const $ = cheerio.load(response); + const content = $('#rso'); + return content + .find('> div') + .map((i, el) => { + const element = $(el); + const link = element.find('div > div > div > div > div > span > a').first().attr('href'); + const title = element.find('div > div > div> div > div > span > a > h3').first().text(); + const imgs = element + .find('img') + .map((_j, _el) => $(_el).attr('src')) + .toArray(); + const description = element.find('div[style="-webkit-line-clamp:2"]').first().text() || element.find('div[role="heading"]').first().text(); + const author = element.find('div > div > div > div > div > span > a > div > div > span').first().text() || ''; + return { + link, + title, + description: renderDescription(description, imgs), + author, + }; + }) + .toArray() + .filter((e) => e?.link); + }, + config.cache.routeExpire, + false + ); + + ctx.state.data = { + title: `${keyword} - Google Search`, + description: `${keyword} - Google Search`, + link: url, + item: items, + }; +}; diff --git a/lib/v2/google/templates/description.art b/lib/v2/google/templates/description.art new file mode 100644 index 0000000000..5f98f4ca33 --- /dev/null +++ b/lib/v2/google/templates/description.art @@ -0,0 +1,6 @@ +{{@ description }} +{{if images}} + {{each images}} + + {{/each}} +{{/if}} diff --git a/lib/routes/sogou/doodles.js b/lib/v2/sogou/doodles.js similarity index 100% rename from lib/routes/sogou/doodles.js rename to lib/v2/sogou/doodles.js diff --git a/lib/v2/sogou/maintainer.js b/lib/v2/sogou/maintainer.js new file mode 100644 index 0000000000..b94d21c1b2 --- /dev/null +++ b/lib/v2/sogou/maintainer.js @@ -0,0 +1,4 @@ +module.exports = { + '/doodles': ['xyqfer'], + '/search/:keyword': ['CaoMeiYouRen'], +}; diff --git a/lib/v2/sogou/radar.js b/lib/v2/sogou/radar.js new file mode 100644 index 0000000000..a548c7fad7 --- /dev/null +++ b/lib/v2/sogou/radar.js @@ -0,0 +1,16 @@ +module.exports = { + 'sogou.com': { + _name: '搜狗', + www: [ + { + title: '搜索', + docs: 'https://docs.rsshub.app/routes/other#sou-gou-sou-suo', + source: '/', + target: (params, url) => { + const keyword = new URL(url).searchParams.get('query'); + return `/sogou/search/${keyword}`; + }, + }, + ], + }, +}; diff --git a/lib/v2/sogou/router.js b/lib/v2/sogou/router.js new file mode 100644 index 0000000000..6dbfd72eb5 --- /dev/null +++ b/lib/v2/sogou/router.js @@ -0,0 +1,4 @@ +module.exports = function (router) { + router.get('/doodles', require('./doodles')); + router.get('/search/:keyword', require('./search')); +}; diff --git a/lib/v2/sogou/search.js b/lib/v2/sogou/search.js new file mode 100644 index 0000000000..9cdb634548 --- /dev/null +++ b/lib/v2/sogou/search.js @@ -0,0 +1,54 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); +const { art } = require('@/utils/render'); +const path = require('path'); +const { parseDate } = require('@/utils/parse-date'); +const config = require('@/config').value; + +const renderDescription = (description, images) => art(path.join(__dirname, './templates/description.art'), { description, images }); + +module.exports = async (ctx) => { + const { keyword } = ctx.params; + const url = `https://www.sogou.com/web?query=${encodeURIComponent(keyword)}`; + const key = `sogou-search:${url}`; + const items = await ctx.cache.tryGet( + key, + async () => { + const response = (await got(url)).data; + const $ = cheerio.load(response); + const result = $('#main'); + return result + .find('.vrwrap') + .map((i, el) => { + const element = $(el); + const imgs = element + .find('img') + .map((j, el2) => $(el2).attr('src')) + .toArray(); + const link = element.find('h3 a').first().attr('href'); + const title = element.find('h3').first().text(); + const description = element.find('.text-layout').first().text() || element.find('.space-txt').first().text() || element.find('[class^="translate"]').first().text(); + const author = element.find('.citeurl span').first().text() || ''; + const pubDate = parseDate(element.find('.citeurl .cite-date').first().text().trim()); + return { + link, + title, + description: renderDescription(description, imgs), + author, + pubDate, + }; + }) + .toArray() + .filter((e) => e?.link); + }, + config.cache.routeExpire, + false + ); + + ctx.state.data = { + title: `${keyword} - 搜狗搜索`, + description: `${keyword} - 搜狗搜索`, + link: url, + item: items, + }; +}; diff --git a/lib/v2/sogou/templates/description.art b/lib/v2/sogou/templates/description.art new file mode 100644 index 0000000000..5f98f4ca33 --- /dev/null +++ b/lib/v2/sogou/templates/description.art @@ -0,0 +1,6 @@ +{{@ description }} +{{if images}} + {{each images}} + + {{/each}} +{{/if}} diff --git a/website/docs/routes/other.mdx b/website/docs/routes/other.mdx index ebce0337e7..42aeebd693 100644 --- a/website/docs/routes/other.mdx +++ b/website/docs/routes/other.mdx @@ -91,6 +91,12 @@ See [#app-store-mac-app-store](/routes/program-update#app-store-mac-app-store) 2. Copy everything in the URL after `?`, for example: `https://www.autotrader.co.uk/car-search?radius=50&postcode=sw1a1aa&onesearchad=Used&onesearchad=Nearly%20New&onesearchad=New&price-to=9000&year-from=2012&body-type=Hatchback&transmission=Automatic&exclude-writeoff-categories=on` will produce `radius=50&postcode=sw1a1aa&onesearchad=Used&onesearchad=Nearly%20New&onesearchad=New&price-to=9000&year-from=2012&body-type=Hatchback&transmission=Automatic&exclude-writeoff-categories=on` +## Bing {#bing} + +### 搜索 {#bing-sou-suo} + + + ## BOOKWALKERTW {#bookwalkertw} ### 热门新书 {#bookwalkertw-re-men-xin-shu} @@ -181,6 +187,10 @@ Official Website: [https://news.yahoo.co.jp/pages/article/20200207](https://news +### Search {#google-search} + + + ## Grand-Challenge {#grand-challenge} ### Challenge 列表 {#grand-challenge-challenge-lie-biao} @@ -597,9 +607,13 @@ Specify options (in the format of query string) in parameter `routeParams` param -## 百度热搜 {#bai-du-re-sou} +## 百度 {#bai-du} -### 榜单 {#bai-du-re-sou-bang-dan} +### 搜索 {#bai-du-sou-suo} + + + +### 热搜榜单 {#bai-du-re-sou-bang-dan} | 热搜榜 | 小说榜 | 电影榜 | 电视剧榜 | 汽车榜 | 游戏榜 | @@ -851,10 +865,14 @@ Specify options (in the format of query string) in parameter `routeParams` param ## 搜狗 {#sou-gou} -### 搜狗特色 LOGO {#sou-gou-sou-gou-te-se-logo} +### 特色 LOGO {#sou-gou-te-se-logo} +### 搜索 {#sou-gou-sou-suo} + + + ## 台灣事實查核中心 {#tai-wan-shi-shi-cha-he-zhong-xin} ### 最新相關資訊 / 最新查核報告 {#tai-wan-shi-shi-cha-he-zhong-xin-zui-xin-xiang-guan-zi-xun-zui-xin-cha-he-bao-gao} diff --git a/website/docs/routes/picture.mdx b/website/docs/routes/picture.mdx index b86598e338..d0bb94d886 100644 --- a/website/docs/routes/picture.mdx +++ b/website/docs/routes/picture.mdx @@ -165,9 +165,9 @@ -## Bing Wallpaper {#bing-wallpaper} +## Bing {#bing} -### Daily Wallpaper {#bing-wallpaper-daily-wallpaper} +### Daily Wallpaper {#bing-daily-wallpaper} From 7d50fff9c283f1e6b3b9e082201e47baa107299c Mon Sep 17 00:00:00 2001 From: Tony Date: Mon, 25 Dec 2023 17:20:52 +0000 Subject: [PATCH 2/9] feat: add back blockbeats (#14113) * feat: add back blockbeats * fix: path --- lib/v2/theblockbeats/index.js | 53 ++++++++++++++++++++++++++++++ lib/v2/theblockbeats/maintainer.js | 3 ++ lib/v2/theblockbeats/radar.js | 19 +++++++++++ lib/v2/theblockbeats/router.js | 3 ++ website/docs/routes/finance.mdx | 10 ++++++ 5 files changed, 88 insertions(+) create mode 100644 lib/v2/theblockbeats/index.js create mode 100644 lib/v2/theblockbeats/maintainer.js create mode 100644 lib/v2/theblockbeats/radar.js create mode 100644 lib/v2/theblockbeats/router.js diff --git a/lib/v2/theblockbeats/index.js b/lib/v2/theblockbeats/index.js new file mode 100644 index 0000000000..371c9327f7 --- /dev/null +++ b/lib/v2/theblockbeats/index.js @@ -0,0 +1,53 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); +const { parseDate } = require('@/utils/parse-date'); + +const domain = 'theblockbeats.info'; +const rootUrl = `https://www.${domain}`; +const apiBase = `https://api.${domain}`; + +const channelMap = { + newsflash: { + title: '快讯', + link: `${rootUrl}/newsflash`, + api: `${apiBase}/v5/newsflash/select`, + }, + article: { + title: '文章', + link: `${rootUrl}/article`, + api: `${apiBase}/v5/Information/newsall`, + }, +}; + +module.exports = async (ctx) => { + const { channel = 'newsflash' } = ctx.params; + + const { data: response } = await got(channelMap[channel].api); + + const { data } = channel === 'newsflash' ? response.data : response; + let list = data.map((item) => ({ + title: item.title, + link: `${rootUrl}/${channel === 'newsflash' ? 'flash' : 'news'}/${item.id}`, + description: item.content ?? item.im_abstract, + pubDate: parseDate(item.add_time, 'X'), + })); + + if (channel !== 'newsflash') { + list = await Promise.all( + list.map((item) => + ctx.cache.tryGet(item.link, async () => { + const { data: response } = await got(item.link); + const $ = cheerio.load(response); + item.description = $('div.news-content').html(); + return item; + }) + ) + ); + } + + ctx.state.data = { + title: `TheBlockBeats - ${channelMap[channel].title}`, + link: channelMap[channel].link, + item: list, + }; +}; diff --git a/lib/v2/theblockbeats/maintainer.js b/lib/v2/theblockbeats/maintainer.js new file mode 100644 index 0000000000..76c0d21495 --- /dev/null +++ b/lib/v2/theblockbeats/maintainer.js @@ -0,0 +1,3 @@ +module.exports = { + '/:channel?': ['Fatpandac', 'jameshih'], +}; diff --git a/lib/v2/theblockbeats/radar.js b/lib/v2/theblockbeats/radar.js new file mode 100644 index 0000000000..c62887f263 --- /dev/null +++ b/lib/v2/theblockbeats/radar.js @@ -0,0 +1,19 @@ +module.exports = { + 'theblockbeats.info': { + _name: '律动', + rszhaopin: [ + { + title: '快讯', + docs: 'https://docs.rsshub.app/routes/finance#lv-dong', + source: ['/'], + target: '/theblockbeats/newsflash', + }, + { + title: '文章', + docs: 'https://docs.rsshub.app/routes/finance#lv-dong', + source: ['/'], + target: '/theblockbeats/article', + }, + ], + }, +}; diff --git a/lib/v2/theblockbeats/router.js b/lib/v2/theblockbeats/router.js new file mode 100644 index 0000000000..cf61ea5c7f --- /dev/null +++ b/lib/v2/theblockbeats/router.js @@ -0,0 +1,3 @@ +module.exports = (router) => { + router.get('/:channel?', require('./index')); +}; diff --git a/website/docs/routes/finance.mdx b/website/docs/routes/finance.mdx index 660fde0dc4..14dc2a2d3e 100644 --- a/website/docs/routes/finance.mdx +++ b/website/docs/routes/finance.mdx @@ -481,6 +481,16 @@ TokenInsight also provides official RSS, you can take a look at [https://api.tok +## 律动 {#lv-dong} + +### 新闻快讯 {#lv-dong-xin-wen-kuai-xun} + + + | 快讯 | 文章 | + | :-------: | :-----: | + | newsflash | article | + + ## 麦肯锡 {#mai-ken-xi} ### 洞见 {#mai-ken-xi-dong-jian} From 1f90b69973be39f46fa0d4bf155a87aba6cae566 Mon Sep 17 00:00:00 2001 From: Tony Date: Mon, 25 Dec 2023 18:23:33 +0000 Subject: [PATCH 3/9] fix: adjust http log level (#14114) * feat: log redirect * fix: change puppeteer/proxy/redirect/got log level to `http` ref: https://github.com/winstonjs/winston#logging-levels (npm levels) --- lib/utils/got.js | 5 +++++ lib/utils/request-wrapper.js | 4 ++-- lib/v2/apkpure/versions.js | 2 +- lib/v2/cw/utils.js | 6 +++--- lib/v2/douyin/live.js | 2 +- lib/v2/fortnite/news.js | 2 +- lib/v2/iqiyi/video.js | 2 +- lib/v2/pnas/index.js | 2 +- lib/v2/sysu/ygafz.js | 2 +- lib/v2/uchicago/current.js | 4 ++-- lib/v2/xiaohongshu/util.js | 6 +++--- website/docs/joinus/new-rss/start-code.md | 6 +++--- .../current/joinus/new-rss/start-code.md | 6 +++--- 13 files changed, 27 insertions(+), 22 deletions(-) diff --git a/lib/utils/got.js b/lib/utils/got.js index 7beb19d51c..802612fb07 100644 --- a/lib/utils/got.js +++ b/lib/utils/got.js @@ -14,6 +14,11 @@ const custom = got.extend({ options.retryCount = count; }, ], + beforeRedirect: [ + (options, response) => { + logger.http(`Redirecting to ${options.url} for ${response.requestUrl}`); + }, + ], afterResponse: [ (response) => { try { diff --git a/lib/utils/request-wrapper.js b/lib/utils/request-wrapper.js index 7b7d9bf6b0..6120df3a4f 100644 --- a/lib/utils/request-wrapper.js +++ b/lib/utils/request-wrapper.js @@ -76,9 +76,9 @@ const requestWrapper = ( } } if (prxied) { - logger.debug(`Proxy for ${url}`); + logger.http(`Proxy for ${url}`); } else { - logger.debug(`Requesting ${url}`); + logger.http(`Requesting ${url}`); } // ua diff --git a/lib/v2/apkpure/versions.js b/lib/v2/apkpure/versions.js index 263b75d906..2236848026 100644 --- a/lib/v2/apkpure/versions.js +++ b/lib/v2/apkpure/versions.js @@ -13,7 +13,7 @@ module.exports = async (ctx) => { page.on('request', (request) => { request.resourceType() === 'document' ? request.continue() : request.abort(); }); - logger.debug(`Requesting ${link}`); + logger.http(`Requesting ${link}`); await page.goto(link, { waitUntil: 'domcontentloaded', }); diff --git a/lib/v2/cw/utils.js b/lib/v2/cw/utils.js index 32ce936267..c4383bf2ca 100644 --- a/lib/v2/cw/utils.js +++ b/lib/v2/cw/utils.js @@ -33,7 +33,7 @@ const getCookie = async (browser, tryGet) => { page.on('request', (request) => { request.resourceType() === 'document' || request.resourceType() === 'script' ? request.continue() : request.abort(); }); - logger.debug(`Requesting ${baseUrl}/user/get/cookie-bar`); + logger.http(`Requesting ${baseUrl}/user/get/cookie-bar`); await page.goto(`${baseUrl}/user/get/cookie-bar`, { waitUntil: 'domcontentloaded', }); @@ -55,7 +55,7 @@ const parsePage = async (path, browser, ctx) => { request.resourceType() === 'document' || request.resourceType() === 'script' ? request.continue() : request.abort(); }); await setCookies(page, cookie, 'cw.com.tw'); - logger.debug(`Requesting ${pageUrl}`); + logger.http(`Requesting ${pageUrl}`); await page.goto(pageUrl, { waitUntil: 'domcontentloaded', }); @@ -93,7 +93,7 @@ const parseItems = (list, browser, tryGet) => request.resourceType() === 'document' || request.resourceType() === 'script' ? request.continue() : request.abort(); }); await setCookies(page, cookie, 'cw.com.tw'); - logger.debug(`Requesting ${item.link}`); + logger.http(`Requesting ${item.link}`); await page.goto(item.link, { waitUntil: 'domcontentloaded', }); diff --git a/lib/v2/douyin/live.js b/lib/v2/douyin/live.js index c60cd9ba70..6e6d36a189 100644 --- a/lib/v2/douyin/live.js +++ b/lib/v2/douyin/live.js @@ -27,7 +27,7 @@ module.exports = async (ctx) => { roomInfo = await response.json(); } }); - logger.debug(`Requesting ${pageUrl}`); + logger.http(`Requesting ${pageUrl}`); await page.goto(pageUrl, { waitUntil: 'networkidle2', }); diff --git a/lib/v2/fortnite/news.js b/lib/v2/fortnite/news.js index 965c93d586..596b96555b 100644 --- a/lib/v2/fortnite/news.js +++ b/lib/v2/fortnite/news.js @@ -29,7 +29,7 @@ module.exports = async (ctx) => { }); // log manually (necessary for puppeteer) - logger.debug(`Requesting ${apiUrl}`); + logger.http(`Requesting ${apiUrl}`); await page.goto(apiUrl, { waitUntil: 'networkidle0', // if use 'domcontentloaded', `await page.content()` is necessary }); diff --git a/lib/v2/iqiyi/video.js b/lib/v2/iqiyi/video.js index 2754483b34..5c0dbe7126 100644 --- a/lib/v2/iqiyi/video.js +++ b/lib/v2/iqiyi/video.js @@ -18,7 +18,7 @@ module.exports = async (ctx) => { page.on('request', (request) => { request.resourceType() === 'document' || request.resourceType() === 'script' ? request.continue() : request.abort(); }); - logger.debug(`Requesting ${link}`); + logger.http(`Requesting ${link}`); await page.goto(link, { waitUntil: 'domcontentloaded', }); diff --git a/lib/v2/pnas/index.js b/lib/v2/pnas/index.js index 5cf8576f98..600b006d2c 100644 --- a/lib/v2/pnas/index.js +++ b/lib/v2/pnas/index.js @@ -46,7 +46,7 @@ module.exports = async (ctx) => { page.on('request', (request) => { request.resourceType() === 'document' ? request.continue() : request.abort(); }); - logger.debug(`Requesting ${item.link}`); + logger.http(`Requesting ${item.link}`); await page.goto(item.link, { waitUntil: 'domcontentloaded', referer: link, diff --git a/lib/v2/sysu/ygafz.js b/lib/v2/sysu/ygafz.js index 150f4d4bb4..4dc2583440 100644 --- a/lib/v2/sysu/ygafz.js +++ b/lib/v2/sysu/ygafz.js @@ -16,7 +16,7 @@ module.exports = async (ctx) => { request.resourceType() === 'document' || request.resourceType() === 'script' ? request.continue() : request.abort(); }); - logger.debug(`Requesting ${url}`); + logger.http(`Requesting ${url}`); await page.goto(url, { waitUntil: 'domcontentloaded', }); diff --git a/lib/v2/uchicago/current.js b/lib/v2/uchicago/current.js index cc86f5ce52..f55c7ade60 100644 --- a/lib/v2/uchicago/current.js +++ b/lib/v2/uchicago/current.js @@ -14,7 +14,7 @@ module.exports = async (ctx) => { page.on('request', (request) => { request.resourceType() === 'document' ? request.continue() : request.abort(); }); - logger.debug(`Requesting ${link}`); + logger.http(`Requesting ${link}`); await page.goto(link, { waitUntil: 'domcontentloaded', }); @@ -36,7 +36,7 @@ module.exports = async (ctx) => { page.on('request', (request) => { request.resourceType() === 'document' ? request.continue() : request.abort(); }); - logger.debug(`Requesting ${item.link}`); + logger.http(`Requesting ${item.link}`); await page.goto(item.link, { waitUntil: 'domcontentloaded', referer: link, diff --git a/lib/v2/xiaohongshu/util.js b/lib/v2/xiaohongshu/util.js index ecffddd151..e911224c19 100644 --- a/lib/v2/xiaohongshu/util.js +++ b/lib/v2/xiaohongshu/util.js @@ -62,7 +62,7 @@ const getBoard = (url, cache) => page.on('request', (request) => { request.resourceType() === 'document' || request.resourceType() === 'script' || request.resourceType() === 'xhr' ? request.continue() : request.abort(); }); - logger.debug(`Requesting ${url}`); + logger.http(`Requesting ${url}`); await page.goto(url); await page.waitForSelector('.pc-container'); const initialSsrState = await page.evaluate(() => window.__INITIAL_SSR_STATE__); @@ -94,7 +94,7 @@ const getNotes = (url, cache) => const page = await browser.newPage(); await setPageFilter(page); - logger.debug(`Requesting ${url}`); + logger.http(`Requesting ${url}`); await page.goto(url); let otherInfo = {}; @@ -124,7 +124,7 @@ const getNotes = (url, cache) => const notePage = await browser.newPage(); await setPageFilter(notePage); - logger.debug(`Requesting ${noteUrl}`); + logger.http(`Requesting ${noteUrl}`); await notePage.goto(noteUrl); let feed = {}; diff --git a/website/docs/joinus/new-rss/start-code.md b/website/docs/joinus/new-rss/start-code.md index 64d4298d00..6f9061d0b3 100644 --- a/website/docs/joinus/new-rss/start-code.md +++ b/website/docs/joinus/new-rss/start-code.md @@ -639,7 +639,7 @@ module.exports = async (ctx) => { // got requests will be logged automatically // but puppeteer requests are not // so we need to log them manually - logger.debug(`Requesting ${link}`); + logger.http(`Requesting ${link}`); await page.goto(link, { // specify how long to wait for the page to load waitUntil: 'domcontentloaded', @@ -711,7 +711,7 @@ module.exports = async (ctx) => { }); const link = `${baseUrl}/${user}/${repo}/issues`; - logger.debug(`Requesting ${link}`); + logger.http(`Requesting ${link}`); await page.goto(link, { waitUntil: 'domcontentloaded', }); @@ -749,7 +749,7 @@ module.exports = async (ctx) => { request.resourceType() === 'document' ? request.continue() : request.abort(); }); - logger.debug(`Requesting ${item.link}`); + logger.http(`Requesting ${item.link}`); await page.goto(item.link, { waitUntil: 'domcontentloaded', }); diff --git a/website/i18n/zh/docusaurus-plugin-content-docs/current/joinus/new-rss/start-code.md b/website/i18n/zh/docusaurus-plugin-content-docs/current/joinus/new-rss/start-code.md index 5b4e68f1a8..eec52ca0c6 100644 --- a/website/i18n/zh/docusaurus-plugin-content-docs/current/joinus/new-rss/start-code.md +++ b/website/i18n/zh/docusaurus-plugin-content-docs/current/joinus/new-rss/start-code.md @@ -636,7 +636,7 @@ module.exports = async (ctx) => { // got 请求会被自动记录, // 但 puppeteer 请求不会 // 所以我们需要手动记录它们 - logger.debug(`Requesting ${link}`); + logger.http(`Requesting ${link}`); await page.goto(link, { // 指定页面等待载入的时间 waitUntil: 'domcontentloaded', @@ -708,7 +708,7 @@ module.exports = async (ctx) => { }); const link = `${baseUrl}/${user}/${repo}/issues`; - logger.debug(`Requesting ${link}`); + logger.http(`Requesting ${link}`); await page.goto(link, { waitUntil: 'domcontentloaded', }); @@ -746,7 +746,7 @@ module.exports = async (ctx) => { request.resourceType() === 'document' ? request.continue() : request.abort(); }); - logger.debug(`Requesting ${item.link}`); + logger.http(`Requesting ${item.link}`); await page.goto(item.link, { waitUntil: 'domcontentloaded', }); From 929eb3dded71230734ac3babb4c4933bef2a2a46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Dec 2023 21:56:42 +0000 Subject: [PATCH 4/9] chore(deps): bump @tonyrl/rand-user-agent from 2.0.42 to 2.0.43 (#14117) * chore(deps): bump @tonyrl/rand-user-agent from 2.0.42 to 2.0.43 Bumps [@tonyrl/rand-user-agent](https://github.com/TonyRL/rand-user-agent) from 2.0.42 to 2.0.43. - [Release notes](https://github.com/TonyRL/rand-user-agent/releases) - [Commits](https://github.com/TonyRL/rand-user-agent/compare/v2.0.42...v2.0.43) --- updated-dependencies: - dependency-name: "@tonyrl/rand-user-agent" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 373b55577d..6ff492103d 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@notionhq/client": "2.2.14", "@postlight/parser": "2.2.3", "@sentry/node": "7.89.0", - "@tonyrl/rand-user-agent": "2.0.42", + "@tonyrl/rand-user-agent": "2.0.43", "aes-js": "3.1.2", "art-template": "4.13.2", "bbcodejs": "0.0.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 236846fcac..a985e6a7ab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ dependencies: specifier: 7.89.0 version: 7.89.0 '@tonyrl/rand-user-agent': - specifier: 2.0.42 - version: 2.0.42 + specifier: 2.0.43 + version: 2.0.43 aes-js: specifier: 3.1.2 version: 3.1.2 @@ -1357,8 +1357,8 @@ packages: defer-to-connect: 2.0.1 dev: false - /@tonyrl/rand-user-agent@2.0.42: - resolution: {integrity: sha512-RfpaTLGXqzeK8DIOj6Gx3eiMIWFHt11ueo6XnvLPUV489WfR0ezy2H1UB58QzR3VGMjlB42VEKhK4asK4xOuqw==} + /@tonyrl/rand-user-agent@2.0.43: + resolution: {integrity: sha512-WSRY50iLJnaDSmOeHRgFHXuZrVjUZAkC0lYnGSe2OVJFtzFzAwoZcUEUCrqlOAKNWg0AjNvxD/kxvWFUYGBpZg==} engines: {node: '>=14.16'} dev: false From a1e42e8bd630dd02c56b8932423f76a0a1a79580 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Dec 2023 22:02:09 +0000 Subject: [PATCH 5/9] chore(deps-dev): bump eslint-plugin-prettier from 5.1.1 to 5.1.2 (#14116) * chore(deps-dev): bump eslint-plugin-prettier from 5.1.1 to 5.1.2 Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.1.1 to 5.1.2. - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.1.1...v5.1.2) --- updated-dependencies: - dependency-name: eslint-plugin-prettier dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 6ff492103d..02f9ca5dc9 100644 --- a/package.json +++ b/package.json @@ -186,7 +186,7 @@ "eslint": "8.56.0", "eslint-config-prettier": "9.1.0", "eslint-plugin-n": "16.5.0", - "eslint-plugin-prettier": "5.1.1", + "eslint-plugin-prettier": "5.1.2", "eslint-plugin-yml": "1.11.0", "fs-extra": "11.2.0", "husky": "8.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a985e6a7ab..17ba01ecf4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -311,8 +311,8 @@ devDependencies: specifier: 16.5.0 version: 16.5.0(eslint@8.56.0) eslint-plugin-prettier: - specifier: 5.1.1 - version: 5.1.1(@types/eslint@8.56.0)(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.1.1) + specifier: 5.1.2 + version: 5.1.2(@types/eslint@8.56.0)(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.1.1) eslint-plugin-yml: specifier: 1.11.0 version: 1.11.0(eslint@8.56.0) @@ -3338,8 +3338,8 @@ packages: semver: 7.5.4 dev: true - /eslint-plugin-prettier@5.1.1(@types/eslint@8.56.0)(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.1.1): - resolution: {integrity: sha512-WQpV3mSmIobb77s4qiCZu3dBrZZ0rj8ckSfBtRrgNK9Wnh2s3eiaxNTWloz1LJ1WtvqZES/PAI7PLvsrGt/CEA==} + /eslint-plugin-prettier@5.1.2(@types/eslint@8.56.0)(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.1.1): + resolution: {integrity: sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: '@types/eslint': '>=8.0.0' @@ -3357,7 +3357,7 @@ packages: eslint-config-prettier: 9.1.0(eslint@8.56.0) prettier: 3.1.1 prettier-linter-helpers: 1.0.0 - synckit: 0.8.5 + synckit: 0.8.6 dev: true /eslint-plugin-yml@1.11.0(eslint@8.56.0): @@ -8444,8 +8444,8 @@ packages: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} dev: false - /synckit@0.8.5: - resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==} + /synckit@0.8.6: + resolution: {integrity: sha512-laHF2savN6sMeHCjLRkheIU4wo3Zg9Ln5YOjOo7sZ5dVQW8yF5pPE5SIw1dsPhq3TRp1jisKRCdPhfs/1WMqDA==} engines: {node: ^14.18.0 || >=16.0.0} dependencies: '@pkgr/utils': 2.4.2 From 126cd702e12eb7e11e05d5941cfd3153927e3c74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Dec 2023 22:54:31 +0000 Subject: [PATCH 6/9] chore(deps): bump @sentry/node from 7.89.0 to 7.91.0 (#14115) * chore(deps): bump @sentry/node from 7.89.0 to 7.91.0 Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 7.89.0 to 7.91.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.89.0...7.91.0) --- updated-dependencies: - dependency-name: "@sentry/node" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 44 ++++++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 02f9ca5dc9..0cdee83474 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "@koa/router": "12.0.1", "@notionhq/client": "2.2.14", "@postlight/parser": "2.2.3", - "@sentry/node": "7.89.0", + "@sentry/node": "7.91.0", "@tonyrl/rand-user-agent": "2.0.43", "aes-js": "3.1.2", "art-template": "4.13.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 17ba01ecf4..513d721159 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,8 +15,8 @@ dependencies: specifier: 2.2.3 version: 2.2.3 '@sentry/node': - specifier: 7.89.0 - version: 7.89.0 + specifier: 7.91.0 + version: 7.91.0 '@tonyrl/rand-user-agent': specifier: 2.0.43 version: 2.0.43 @@ -1269,46 +1269,46 @@ packages: selderee: 0.11.0 dev: false - /@sentry-internal/tracing@7.89.0: - resolution: {integrity: sha512-cSwno2NYteBBqOvcm/ue9cJxGGl2uffG4laEyLR9y4we+bYxigfx/Ki2TFOtwXrv5o59eRAtN1lpzaAf43yfBw==} + /@sentry-internal/tracing@7.91.0: + resolution: {integrity: sha512-JH5y6gs6BS0its7WF2DhySu7nkhPDfZcdpAXldxzIlJpqFkuwQKLU5nkYJpiIyZz1NHYYtW5aum2bV2oCOdDRA==} engines: {node: '>=8'} dependencies: - '@sentry/core': 7.89.0 - '@sentry/types': 7.89.0 - '@sentry/utils': 7.89.0 + '@sentry/core': 7.91.0 + '@sentry/types': 7.91.0 + '@sentry/utils': 7.91.0 dev: false - /@sentry/core@7.89.0: - resolution: {integrity: sha512-aU3wfZ+tyFi4T06fOH3z5xnTyMzwvzyEohYOmnQnDrqNgvDzjWkyeUzWse9FaFiut8lBN9O+Pd2H0ucPBMPEhQ==} + /@sentry/core@7.91.0: + resolution: {integrity: sha512-tu+gYq4JrTdrR+YSh5IVHF0fJi/Pi9y0HZ5H9HnYy+UMcXIotxf6hIEaC6ZKGeLWkGXffz2gKpQLe/g6vy/lPA==} engines: {node: '>=8'} dependencies: - '@sentry/types': 7.89.0 - '@sentry/utils': 7.89.0 + '@sentry/types': 7.91.0 + '@sentry/utils': 7.91.0 dev: false - /@sentry/node@7.89.0: - resolution: {integrity: sha512-3uP0HtwsrTKOUi+Az8j/E2YQA9sjHWWLrNo2CiZVOtQNYtH8SZqQeTrnOi9bqhM7NyHtKz1JrXzttj/LWkUvRA==} + /@sentry/node@7.91.0: + resolution: {integrity: sha512-hTIfSQxD7L+AKIqyjoq8CWBRkEQrrMZmA3GSZgPI5JFWBHgO0HBo5TH/8TU81oEJh6kqqHAl2ObMhmcnaFqlzg==} engines: {node: '>=8'} dependencies: - '@sentry-internal/tracing': 7.89.0 - '@sentry/core': 7.89.0 - '@sentry/types': 7.89.0 - '@sentry/utils': 7.89.0 + '@sentry-internal/tracing': 7.91.0 + '@sentry/core': 7.91.0 + '@sentry/types': 7.91.0 + '@sentry/utils': 7.91.0 https-proxy-agent: 5.0.1 transitivePeerDependencies: - supports-color dev: false - /@sentry/types@7.89.0: - resolution: {integrity: sha512-5Rqt6vIP652p01ypUaEIrELjsHF0vUnzj/JFz+i7nXv6w77GPpNzeIlMYdnauBIgJhLUvYCTQaOPV9GhgZhc4g==} + /@sentry/types@7.91.0: + resolution: {integrity: sha512-bcQnb7J3P3equbCUc+sPuHog2Y47yGD2sCkzmnZBjvBT0Z1B4f36fI/5WjyZhTjLSiOdg3F2otwvikbMjmBDew==} engines: {node: '>=8'} dev: false - /@sentry/utils@7.89.0: - resolution: {integrity: sha512-t6qDQajdAjZ6LPraAWO00ZjvDbNH82DoVGV/2o4C5MBPCutJGTGyWIpI2tliYPZPPx+3C2m5L757zh1dCzrgUg==} + /@sentry/utils@7.91.0: + resolution: {integrity: sha512-fvxjrEbk6T6Otu++Ax9ntlQ0sGRiwSC179w68aC3u26Wr30FAIRKqHTCCdc2jyWk7Gd9uWRT/cq+g8NG/8BfSg==} engines: {node: '>=8'} dependencies: - '@sentry/types': 7.89.0 + '@sentry/types': 7.91.0 dev: false /@sinclair/typebox@0.27.8: From d88a3aed2c257f65228ffe100d8b3aeb46d91295 Mon Sep 17 00:00:00 2001 From: SUEPbot <114787369+SUEPbot@users.noreply.github.com> Date: Tue, 26 Dec 2023 21:33:14 +0800 Subject: [PATCH 7/9] fix(route): fix shiep/hhxy shiep/jsjxy (#14110) * fix(route): sort shiep config * fix(route): fix shiep/hhxy shiep/jsjxy * refactor: list processing in shiep/index.js Co-authored-by: Tony * refactor: selector in shiep --------- --- lib/v2/shiep/config.js | 20 ++++++++++---------- lib/v2/shiep/index.js | 8 ++++---- lib/v2/shiep/radar.js | 16 ++++++++-------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/lib/v2/shiep/config.js b/lib/v2/shiep/config.js index 5d1754da93..8694d39a43 100644 --- a/lib/v2/shiep/config.js +++ b/lib/v2/shiep/config.js @@ -1,12 +1,12 @@ const config = { bwc: { title: '武装部保卫处', id: 'tzgg' }, - career: { title: '本科就业信息网', id: 'tzgg', listSelector: 'ul.newsList', pubDateSelector: 'li[class="span2 y"]', descriptionSelector: '.aContent' }, + career: { title: '本科就业信息网', id: 'tzgg', listSelector: 'ul.newsList', pubDateSelector: 'li.span2.y', descriptionSelector: '.aContent' }, cyb: { title: '资产经营公司/产业办', id: '367' }, dangban: { title: '党委办公室', id: '4014' }, - djfwzxdcs: { title: '党建服务中心/党建督查室', id: 'tzgg', listSelector: '.news', pubDateSelector: 'span[class="news_meta"]' }, + djfwzxdcs: { title: '党建服务中心/党建督查室', id: 'tzgg', listSelector: 'li.news', pubDateSelector: 'span.news_meta' }, dqxy: { title: '电气工程学院', id: '2462' }, dwllc: { title: '对外联络处', id: '2649' }, - dxxy: { title: '电子与信息工程学院', id: 'tzgg', pubDateSelector: 'div[class="article-publishdate"]' }, + dxxy: { title: '电子与信息工程学院', id: 'tzgg', pubDateSelector: 'div.article-publishdate' }, energy: { title: '能源与机械工程学院', id: '892' }, 'energy-saving': { title: '上海热交换系统节能工程技术研究中心', id: 'tzgg' }, english: { title: 'Shanghai University of Electric Power', id: 'events' }, @@ -17,16 +17,16 @@ const config = { gonghui: { title: '工会', id: '1806', listSelector: 'table.wp_article_list_table tr', pubDateSelector: 'td[align="right"]' }, 'green-energy': { title: '上海绿色能源并网技术研究中心', id: '118' }, hhsyzx: { title: '能源化学实验教学中心', id: '3709' }, - hhxy: { title: '环境与化学工程学院', id: '1231' }, + hhxy: { title: '环境与化学工程学院', id: '5559', listSelector: 'li.list-item', pubDateSelector: 'div.item-publishdate' }, hqglc: { title: '后勤管理处(后勤服务中心)', id: '1616' }, - ieetc: { title: '创新创业工程训练中心', id: 'cxcy', pubDateSelector: 'div[class="article-publishdate"]' }, + ieetc: { title: '创新创业工程训练中心', id: 'cxcy', pubDateSelector: 'div.article-publishdate' }, jgdw: { title: '机关党委', id: '3205' }, jgxy: { title: '经济与管理学院', id: '3633' }, jijian: { title: '纪委(监察专员办公室)', id: '59' }, jjc: { title: '基建处', id: '327' }, jjxy: { title: '继续教育学院(国际教育学院)', id: '2582' }, jsjxfzzx: { title: '教师教学发展中心', id: '3909' }, - jsjxy: { title: '计算机科学与技术学院', id: 'xygg', listSelector: 'div.xy-service-text', pubDateSelector: 'span' }, + jsjxy: { title: '计算机科学与技术学院', id: 'xygg', listSelector: 'div.post-entry-2', pubDateSelector: 'span:nth-child(2)' }, jszyzx: { title: '技术转移中心', id: '4247' }, jwc: { title: '教务处', id: '227' }, jxfz: { title: '电力装备设计与制造虚拟仿真中心', id: '3330' }, @@ -34,7 +34,7 @@ const config = { kyc: { title: '科研处/融合办', id: '834' }, lgxq: { title: '临港新校区建设综合办公室', id: '377' }, library: { title: '图书馆', id: '4866' }, - metc: { title: '现代教育技术中心/信息办', id: 'tzgg', pubDateSelector: 'div[class="article-publishdate"]' }, + metc: { title: '现代教育技术中心/信息办', id: 'tzgg', pubDateSelector: 'div.article-publishdate' }, mpep: { title: '上海市电力材料防护与新材料重点实验室', id: '1134' }, news: { title: '新闻网', id: 'notice' }, nydlzk: { title: '能源电力智库', id: 'tzgg' }, @@ -47,9 +47,9 @@ const config = { slxy: { title: '数理学院', id: '2063' }, spgc: { title: '智能发电实验教学中心', id: '4449' }, sysyzcglc: { title: '实验室与资产管理处', id: '312' }, - tgb: { title: '离退休党委/退管办', id: 'notice', pubDateSelector: 'div[class="article-publishdate"]' }, + tgb: { title: '离退休党委/退管办', id: 'notice', pubDateSelector: 'div.article-publishdate' }, tw: { title: '团委', id: '2092' }, - tyb: { title: '体育学院', id: '2891', pubDateSelector: 'div[class="article-publishdate"]' }, + tyb: { title: '体育学院', id: '2891', pubDateSelector: 'div.article-publishdate' }, tzb: { title: '统战部', id: '3858' }, wenming: { title: '文明办', id: '2202' }, wgyxy: { title: '外国语学院', id: 'tzgg' }, @@ -59,8 +59,8 @@ const config = { xxgk: { title: '信息公开网', id: 'zxgkxx' }, yjsc: { title: '研究生院/研工部', id: '1161' }, zdhxy: { title: '自动化工程学院', id: '2002' }, - ztjy: { title: '学习路上', id: '5575' }, zs: { title: '本科招生网', id: 'zxxx' }, + ztjy: { title: '学习路上', id: '5575' }, zzb: { title: '组织部(老干部处、党校)', id: '1534' }, }; diff --git a/lib/v2/shiep/index.js b/lib/v2/shiep/index.js index b054f51d2c..f189ddc907 100644 --- a/lib/v2/shiep/index.js +++ b/lib/v2/shiep/index.js @@ -21,10 +21,10 @@ module.exports = async (ctx) => { const $ = cheerio.load(response.data); const listSelector = config[type].listSelector || '.list_item'; - const pubDateSelector = config[type].pubDateSelector || 'span[class="Article_PublishDate"]'; + const pubDateSelector = config[type].pubDateSelector || '.Article_PublishDate'; const descriptionSelector = config[type].descriptionSelector || '.wp_articlecontent'; - const items = $(listSelector) + const list = $(listSelector) .toArray() .filter((item) => { const date = dayjs($(item).find(pubDateSelector).text().trim()); @@ -39,8 +39,8 @@ module.exports = async (ctx) => { }; }); - await Promise.all( - items.map((item) => + const items = await Promise.all( + list.map((item) => ctx.cache.tryGet(item.link, async () => { try { const response = await got(item.link); diff --git a/lib/v2/shiep/radar.js b/lib/v2/shiep/radar.js index 9c8a993774..94e29aae75 100644 --- a/lib/v2/shiep/radar.js +++ b/lib/v2/shiep/radar.js @@ -481,14 +481,6 @@ module.exports = { target: '/shiep/zdhxy/:id', }, ], - ztjy: [ - { - title: '学习路上', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/ztjy/:id', - }, - ], zs: [ { title: '本科招生网', @@ -497,6 +489,14 @@ module.exports = { target: '/shiep/zs/:id', }, ], + ztjy: [ + { + title: '学习路上', + docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', + source: ['/:id/list.htm'], + target: '/shiep/ztjy/:id', + }, + ], zzb: [ { title: '组织部(老干部处、党校)', From debc0df462124cabd5ef05288a931d1f0abb7a32 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Wed, 27 Dec 2023 00:36:28 +0800 Subject: [PATCH 8/9] =?UTF-8?q?feat(route):=20add=20=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=96=B0=E9=97=BB=E6=A0=8F=E7=9B=AE=20(#14121)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/v2/jiemian/list.js | 60 --- lib/v2/jiemian/lists.js | 93 ++++ lib/v2/jiemian/maintainer.js | 7 +- lib/v2/jiemian/radar.js | 628 +++++++++++++++++++++- lib/v2/jiemian/router.js | 9 +- lib/v2/jiemian/templates/description.art | 39 ++ website/docs/routes/traditional-media.mdx | 130 ++++- 7 files changed, 889 insertions(+), 77 deletions(-) delete mode 100644 lib/v2/jiemian/list.js create mode 100644 lib/v2/jiemian/lists.js create mode 100644 lib/v2/jiemian/templates/description.art diff --git a/lib/v2/jiemian/list.js b/lib/v2/jiemian/list.js deleted file mode 100644 index c316154ca1..0000000000 --- a/lib/v2/jiemian/list.js +++ /dev/null @@ -1,60 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const timezone = require('@/utils/timezone'); -const { parseDate } = require('@/utils/parse-date'); - -module.exports = async (ctx) => { - const id = ctx.params.id ?? '4'; - - const rootUrl = 'https://www.jiemian.com'; - const currentUrl = `${rootUrl}/lists/${id}.html`; - - const response = await got({ - method: 'get', - url: currentUrl, - }); - - const $ = cheerio.load(response.data); - - let items = $('.card-list__content, .columns-right-center__newsflash-content') - .slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 15) - .toArray() - .map((item) => { - item = $(item).find('a'); - - return { - title: item.text(), - link: item.attr('href'), - }; - }); - - items = await Promise.all( - items.map((item) => - ctx.cache.tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, - }); - - const content = cheerio.load(detailResponse.data); - - const pubDate = content('.article-info span[data-article-publish-time]').attr('data-article-publish-time'); - const timeMatches = content('.article-info') - .text() - .match(/\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}/); - - item.description = content('.article-content').html(); - item.author = content('.article-info .author').first().text().replace(/·/, '').trim(); - item.pubDate = timeMatches ? timezone(parseDate(timeMatches[0]), +8) : parseDate(pubDate, 'X'); - - return item; - }) - ) - ); - - ctx.state.data = { - title: $('title').text(), - link: currentUrl, - item: items, - }; -}; diff --git a/lib/v2/jiemian/lists.js b/lib/v2/jiemian/lists.js new file mode 100644 index 0000000000..a0cf7b251e --- /dev/null +++ b/lib/v2/jiemian/lists.js @@ -0,0 +1,93 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); +const { parseDate } = require('@/utils/parse-date'); +const { art } = require('@/utils/render'); +const path = require('path'); + +module.exports = async (ctx) => { + const { category = '' } = ctx.params; + const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 50; + + const rootUrl = 'https://www.jiemian.com'; + const currentUrl = new URL(category ? `${category}.html` : '', rootUrl).href; + + const { data: response } = await got(currentUrl); + + const $ = cheerio.load(response); + + let items = $('a.logStore, a[aid], div.title a, div.news-header a') + .toArray() + .map((item) => { + item = $(item); + + return { + title: item.text(), + link: item.prop('href'), + }; + }) + .filter((item) => item.link && !item.link.startsWith(new URL('special', rootUrl).href)); + + items = await Promise.all( + items.slice(0, limit).map((item) => + ctx.cache.tryGet(item.link, async () => { + const { data: detailResponse } = await got(item.link); + + const content = cheerio.load(detailResponse); + const image = content('div.article-img img').first(); + const video = content('#video-player').first(); + + item.title = content('div.article-header h1').text(); + item.description = art(path.join(__dirname, 'templates/description.art'), { + image: image + ? { + src: image.prop('src'), + alt: image.next('p').text() || item.title, + } + : undefined, + video: video + ? { + src: video.prop('data-url'), + poster: video.prop('data-poster'), + width: video.prop('width'), + height: video.prop('height'), + } + : undefined, + intro: content('div.article-header p').text(), + description: content('div.article-content').html(), + }); + item.author = content('span.author') + .first() + .find('a') + .toArray() + .map((a) => content(a).text()) + .join('/'); + item.category = content('meta.meta-container a') + .toArray() + .map((c) => content(c).text()); + item.pubDate = parseDate(content('div.article-info span[data-article-publish-time]').prop('data-article-publish-time'), 'X'); + item.upvotes = content('span.opt-praise__count').text() ? parseInt(content('span.opt-praise__count').text(), 10) : 0; + item.comments = content('span.opt-comment__count').text() ? parseInt(content('span.opt-comment__count').text(), 10) : 0; + + return item; + }) + ) + ); + + const title = $('title').text(); + const titleSplits = title.split(/_/); + const image = $('div.logo img').prop('src'); + const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl).href; + + ctx.state.data = { + item: items, + title, + link: currentUrl, + description: $('meta[name="description"]').prop('content'), + language: $('html').prop('lang'), + image, + icon, + logo: icon, + subtitle: titleSplits[0], + author: titleSplits.pop(), + }; +}; diff --git a/lib/v2/jiemian/maintainer.js b/lib/v2/jiemian/maintainer.js index 990bdf08bb..9af6acce17 100644 --- a/lib/v2/jiemian/maintainer.js +++ b/lib/v2/jiemian/maintainer.js @@ -1,4 +1,7 @@ module.exports = { - '/list/:id?': ['WenhuWee', 'nczitzk'], - '/': ['nczitzk'], + '/lists/:id': ['WenhuWee', 'nczitzk'], + '/pro/lists/:id': ['nczitzk'], + '/account/main/:id': ['nczitzk'], + '/video/lists/:id': ['nczitzk'], + '/special/lists/:id': ['nczitzk'], }; diff --git a/lib/v2/jiemian/radar.js b/lib/v2/jiemian/radar.js index 2b7cbf7b63..f37a6d3d04 100644 --- a/lib/v2/jiemian/radar.js +++ b/lib/v2/jiemian/radar.js @@ -3,16 +3,628 @@ module.exports = { _name: '界面新闻', '.': [ { - title: '快报', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-kuai-bao', - source: ['/list/:id', '/'], - target: '/jiemian', + title: '首页 - 科技', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', + source: ['/lists/65.html'], + target: '/jiemian/lists/65', }, { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu', - source: ['/list/:id', '/'], - target: '/jiemian/list/:id', + title: '首页 - 金融', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', + source: ['/lists/9.html'], + target: '/jiemian/lists/9', + }, + { + title: '首页 - 证券', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', + source: ['/lists/112.html'], + target: '/jiemian/lists/112', + }, + { + title: '首页 - 地产', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', + source: ['/lists/62.html'], + target: '/jiemian/lists/62', + }, + { + title: '首页 - 汽车', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', + source: ['/lists/51.html'], + target: '/jiemian/lists/51', + }, + { + title: '首页 - 健康', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', + source: ['/lists/472.html'], + target: '/jiemian/lists/472', + }, + { + title: '首页 - 地方', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', + source: ['/city/main/277.html'], + target: '/jiemian/city/main/277', + }, + { + title: '首页 - 大湾区', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', + source: ['/lists/680.html'], + target: '/jiemian/lists/680', + }, + { + title: '首页 - 元宇宙', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', + source: ['/lists/704.html'], + target: '/jiemian/lists/704', + }, + { + title: '首页 - 文旅', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', + source: ['/lists/105.html'], + target: '/jiemian/lists/105', + }, + { + title: '首页 - 数据', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', + source: ['/lists/154.html'], + target: '/jiemian/lists/154', + }, + { + title: '首页 - ESG', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', + source: ['/lists/712.html'], + target: '/jiemian/lists/712', + }, + { + title: '首页 - 双碳', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', + source: ['/lists/877.html'], + target: '/jiemian/lists/877', + }, + { + title: '首页 - 电厂', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', + source: ['/lists/872.html'], + target: '/jiemian/lists/872', + }, + { + title: '商业 - 科技', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/65.html'], + target: '/jiemian/lists/65', + }, + { + title: '商业 - 地产', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/62.html'], + target: '/jiemian/lists/62', + }, + { + title: '商业 - 汽车', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/51.html'], + target: '/jiemian/lists/51', + }, + { + title: '商业 - 消费', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/31.html'], + target: '/jiemian/lists/31', + }, + { + title: '商业 - 工业', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/28.html'], + target: '/jiemian/lists/28', + }, + { + title: '商业 - 时尚', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/68.html'], + target: '/jiemian/lists/68', + }, + { + title: '商业 - 交通', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/30.html'], + target: '/jiemian/lists/30', + }, + { + title: '商业 - 医药', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/472.html'], + target: '/jiemian/lists/472', + }, + { + title: '商业 - 互联网', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/851.html'], + target: '/jiemian/lists/851', + }, + { + title: '商业 - 创投 ', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/858.html'], + target: '/jiemian/lists/858', + }, + { + title: '商业 - 能源', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/856.html'], + target: '/jiemian/lists/856', + }, + { + title: '商业 - 数码', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/853.html'], + target: '/jiemian/lists/853', + }, + { + title: '商业 - 教育', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/256.html'], + target: '/jiemian/lists/256', + }, + { + title: '商业 - 食品', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/845.html'], + target: '/jiemian/lists/845', + }, + { + title: '商业 - 新能源', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/857.html'], + target: '/jiemian/lists/857', + }, + { + title: '商业 - 家电', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/850.html'], + target: '/jiemian/lists/850', + }, + { + title: '商业 - 健康', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/854.html'], + target: '/jiemian/lists/854', + }, + { + title: '商业 - 酒业', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/676.html'], + target: '/jiemian/lists/676', + }, + { + title: '商业 - 物流', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/841.html'], + target: '/jiemian/lists/841', + }, + { + title: '商业 - 零售', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/847.html'], + target: '/jiemian/lists/847', + }, + { + title: '商业 - 美妆', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/838.html'], + target: '/jiemian/lists/838', + }, + { + title: '商业 - 楼市', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/city/main/181.html'], + target: '/jiemian/city/main/181', + }, + { + title: '商业 - 家居', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/694.html'], + target: '/jiemian/lists/694', + }, + { + title: '商业 - 餐饮', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/848.html'], + target: '/jiemian/lists/848', + }, + { + title: '商业 - 日用', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/846.html'], + target: '/jiemian/lists/846', + }, + { + title: '商业 - 企服', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/852.html'], + target: '/jiemian/lists/852', + }, + { + title: '商业 - 珠宝', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/839.html'], + target: '/jiemian/lists/839', + }, + { + title: '商业 - 腕表', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/840.html'], + target: '/jiemian/lists/840', + }, + { + title: '商业 - 商学院', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/605.html'], + target: '/jiemian/lists/605', + }, + { + title: '商业 - 元宇宙', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/704.html'], + target: '/jiemian/lists/704', + }, + { + title: '商业 - 电厂', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/872.html'], + target: '/jiemian/lists/872', + }, + { + title: '商业 - 农业', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', + source: ['/lists/883.html'], + target: '/jiemian/lists/883', + }, + { + title: '财经 - 金融', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', + source: ['/lists/9.html'], + target: '/jiemian/lists/9', + }, + { + title: '财经 - 投资', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', + source: ['/lists/86.html'], + target: '/jiemian/lists/86', + }, + { + title: '财经 - 证券', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', + source: ['/lists/112.html'], + target: '/jiemian/lists/112', + }, + { + title: '财经 - IPO', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', + source: ['/lists/699.html'], + target: '/jiemian/lists/699', + }, + { + title: '财经 - 宏观', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', + source: ['/lists/174.html'], + target: '/jiemian/lists/174', + }, + { + title: '财经 - 股市', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', + source: ['/lists/418.html'], + target: '/jiemian/lists/418', + }, + { + title: '财经 - 财富', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', + source: ['/lists/410.html'], + target: '/jiemian/lists/410', + }, + { + title: '财经 - 有连云', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', + source: ['/lists/889.html'], + target: '/jiemian/lists/889', + }, + { + title: '新闻 - 天下', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', + source: ['/lists/32.html'], + target: '/jiemian/lists/32', + }, + { + title: '新闻 - 中国', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', + source: ['/lists/71.html'], + target: '/jiemian/lists/71', + }, + { + title: '新闻 - 地方', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', + source: ['/city/main/279.html'], + target: '/jiemian/city/main/279', + }, + { + title: '新闻 - 评论', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', + source: ['/lists/8.html'], + target: '/jiemian/lists/8', + }, + { + title: '新闻 - 数据', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', + source: ['/lists/154.html'], + target: '/jiemian/lists/154', + }, + { + title: '新闻 - 职场', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', + source: ['/lists/50.html'], + target: '/jiemian/lists/50', + }, + { + title: '新闻 - 国是', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', + source: ['/lists/422.html'], + target: '/jiemian/lists/422', + }, + { + title: '新闻 - 体育', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', + source: ['/lists/82.html'], + target: '/jiemian/lists/82', + }, + { + title: '新闻 - 文娱', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', + source: ['/lists/63.html'], + target: '/jiemian/lists/63', + }, + { + title: '新闻 - 影像', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', + source: ['/lists/225.html'], + target: '/jiemian/lists/225', + }, + { + title: '新闻 - 营销', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', + source: ['/lists/49.html'], + target: '/jiemian/lists/49', + }, + { + title: '新闻 - 大湾区', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', + source: ['/lists/680.html'], + target: '/jiemian/lists/680', + }, + { + title: '新闻 - ESG', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', + source: ['/lists/712.html'], + target: '/jiemian/lists/712', + }, + { + title: '新闻 - 双碳', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', + source: ['/lists/877.html'], + target: '/jiemian/lists/877', + }, + { + title: '新闻 - 长三角', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', + source: ['/lists/917.html'], + target: '/jiemian/lists/917', + }, + { + title: '文化生活 - 文化', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', + source: ['/lists/130.html'], + target: '/jiemian/lists/130', + }, + { + title: '文化生活 - 文旅', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', + source: ['/lists/105.html'], + target: '/jiemian/lists/105', + }, + { + title: '文化生活 - 生活方式', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', + source: ['/lists/135.html'], + target: '/jiemian/lists/135', + }, + { + title: '文化生活 - 美食美酒', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', + source: ['/lists/865.html'], + target: '/jiemian/lists/865', + }, + { + title: '文化生活 - 艺术', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', + source: ['/lists/643.html'], + target: '/jiemian/lists/643', + }, + { + title: '文化生活 - 游戏', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', + source: ['/lists/118.html'], + target: '/jiemian/lists/118', + }, + { + title: '文化生活 - 正午', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', + source: ['/lists/53.html'], + target: '/jiemian/lists/53', + }, + { + title: '文化生活 - 箭厂', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', + source: ['/video/lists/195_1.html'], + target: '/jiemian/video/lists/195_1', + }, + { + title: '快报 - 今日热点', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-kuai-bao', + source: ['/lists/1324kb.html'], + target: '/jiemian/lists/1324kb', + }, + { + title: '快报 - 公司头条', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-kuai-bao', + source: ['/lists/1322kb.html'], + target: '/jiemian/lists/1322kb', + }, + { + title: '快报 - 股市前沿', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-kuai-bao', + source: ['/lists/1327kb.html'], + target: '/jiemian/lists/1327kb', + }, + { + title: '快报 - 监管通报', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-kuai-bao', + source: ['/lists/1330kb.html'], + target: '/jiemian/lists/1330kb', + }, + { + title: '快报 - 财经速览', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-kuai-bao', + source: ['/lists/1326kb.html'], + target: '/jiemian/lists/1326kb', + }, + { + title: '快报 - 时事追踪', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-kuai-bao', + source: ['/lists/1325kb.html'], + target: '/jiemian/lists/1325kb', + }, + { + title: 'VIP - 投资早晚报', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', + source: ['/pro/lists/12.html'], + target: '/jiemian/pro/lists/12', + }, + { + title: 'VIP - 宏观晚6点', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', + source: ['/pro/lists/20.html'], + target: '/jiemian/pro/lists/20', + }, + { + title: 'VIP - 打新早报', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', + source: ['/pro/lists/21.html'], + target: '/jiemian/pro/lists/21', + }, + { + title: 'VIP - 盘前机会前瞻', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', + source: ['/pro/lists/13.html'], + target: '/jiemian/pro/lists/13', + }, + { + title: 'VIP - 公告快评', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', + source: ['/pro/lists/14.html'], + target: '/jiemian/pro/lists/14', + }, + { + title: 'VIP - 盘中必读', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', + source: ['/pro/lists/15.html'], + target: '/jiemian/pro/lists/15', + }, + { + title: 'VIP - 金股挖掘', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', + source: ['/pro/lists/16.html'], + target: '/jiemian/pro/lists/16', + }, + { + title: 'VIP - 调研早知道', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', + source: ['/pro/lists/17.html'], + target: '/jiemian/pro/lists/17', + }, + { + title: 'VIP - 研报新知', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', + source: ['/pro/lists/18.html'], + target: '/jiemian/pro/lists/18', + }, + { + title: 'VIP - 大势侦察', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', + source: ['/pro/lists/1.html'], + target: '/jiemian/pro/lists/1', + }, + { + title: 'VIP - 市场风向标', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', + source: ['/pro/lists/19.html'], + target: '/jiemian/pro/lists/19', + }, + { + title: '界面号 - 财经号', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-jie-mian-hao', + source: ['/account/main/1.html'], + target: '/jiemian/account/main/1', + }, + { + title: '界面号 - 城市号', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-jie-mian-hao', + source: ['/account/main/2.html'], + target: '/jiemian/account/main/2', + }, + { + title: '界面号 - 媒体号', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-jie-mian-hao', + source: ['/account/main/3.html'], + target: '/jiemian/account/main/3', + }, + { + title: '视频 - 界面Vnews', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-shi-pin', + source: ['/video/lists/258_1.html'], + target: '/jiemian/video/lists/258_1', + }, + { + title: '视频 - 直播', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-shi-pin', + source: ['/videoLive/lists_1.html'], + target: '/jiemian/videoLive/lists_1', + }, + { + title: '视频 - 箭厂', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-shi-pin', + source: ['/video/lists/195_1.html'], + target: '/jiemian/video/lists/195_1', + }, + { + title: '视频 - 面谈', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-shi-pin', + source: ['/video/lists/111_1.html'], + target: '/jiemian/video/lists/111_1', + }, + { + title: '视频 - 品牌创酷', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-shi-pin', + source: ['/video/lists/226_1.html'], + target: '/jiemian/video/lists/226_1', + }, + { + title: '视频 - 番茄社', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-shi-pin', + source: ['/video/lists/567_1.html'], + target: '/jiemian/video/lists/567_1', + }, + { + title: '视频 - 商业微史记', + docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-shi-pin', + source: ['/video/lists/882_1.html'], + target: '/jiemian/video/lists/882_1', }, ], }, diff --git a/lib/v2/jiemian/router.js b/lib/v2/jiemian/router.js index d66af1b994..e526675e03 100644 --- a/lib/v2/jiemian/router.js +++ b/lib/v2/jiemian/router.js @@ -1,4 +1,9 @@ module.exports = function (router) { - router.get('/list/:id?', require('./list')); - router.get('/', require('./list')); + router.get('/list/:id', (ctx) => { + const { id } = ctx.params; + + const redirectTo = `/jiemian${id ? `/lists/${id}` : ''}`; + ctx.redirect(redirectTo); + }); + router.get('/:category*', require('./lists')); }; diff --git a/lib/v2/jiemian/templates/description.art b/lib/v2/jiemian/templates/description.art new file mode 100644 index 0000000000..83b5eb0b7f --- /dev/null +++ b/lib/v2/jiemian/templates/description.art @@ -0,0 +1,39 @@ +{{ if !video?.src && image?.src }} +
+ {{ image.alt }} +
+{{ /if }} + +{{ if intro }} +

{{ intro }}

+{{ /if }} + +{{ if video?.src }} + +{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file diff --git a/website/docs/routes/traditional-media.mdx b/website/docs/routes/traditional-media.mdx index b1b04c17c0..ef5872940c 100644 --- a/website/docs/routes/traditional-media.mdx +++ b/website/docs/routes/traditional-media.mdx @@ -1176,13 +1176,133 @@ This route adds the missing photo and Link element. (Offical RSS doesn't have Li ## 界面新闻 {#jie-mian-xin-wen} -### 快报 {#jie-mian-xin-wen-kuai-bao} - - - ### 栏目 {#jie-mian-xin-wen-lan-mu} - + + | [首页](https://www.jiemian.com) | [商业](https://www.jiemian.com/lists/2.html) | [财经](https://www.jiemian.com/lists/800.html) | [新闻](https://www.jiemian.com/lists/801.html) | [文化生活](https://www.jiemian.com/lists/130.html) | [快报](https://www.jiemian.com/lists/4.html) | + | ------------------------------- | -------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -------------------------------------------------- | -------------------------------------------- | + | | 2 | 800 | 801 | 130 | 4 | + +
+ 更多分类 + + #### [首页](https://www.jiemian.com) + + | [科技](https://www.jiemian.com/lists/65.html) | [金融](https://www.jiemian.com/lists/9.html) | [证券](https://www.jiemian.com/lists/112.html) | [地产](https://www.jiemian.com/lists/62.html) | [汽车](https://www.jiemian.com/lists/51.html) | [健康](https://www.jiemian.com/lists/472.html) | + | --------------------------------------------- | -------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | + | 65 | 9 | 112 | 62 | 51 | 472 | + + | [大湾区](https://www.jiemian.com/lists/680.html) | [元宇宙](https://www.jiemian.com/lists/704.html) | [文旅](https://www.jiemian.com/lists/105.html) | [数据](https://www.jiemian.com/lists/154.html) | [ESG](https://www.jiemian.com/lists/712.html) | [双碳](https://www.jiemian.com/lists/877.html) | + | ------------------------------------------------ | ------------------------------------------------ | ---------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | + | 680 | 704 | 105 | 154 | 712 | 877 | + + | [电厂](https://www.jiemian.com/lists/872.html) | + | ---------------------------------------------- | + | 872 | + + #### [商业](https://www.jiemian.com/lists/2.html) + + | [科技](https://www.jiemian.com/lists/65.html) | [地产](https://www.jiemian.com/lists/62.html) | [ 汽车](https://www.jiemian.com/lists/51.html) | [消费](https://www.jiemian.com/lists/31.html) | [工业](https://www.jiemian.com/lists/28.html) | [时尚](https://www.jiemian.com/lists/68.html) | + | --------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | + | 65 | 62 | 51 | 31 | 28 | 68 | + + | [交通](https://www.jiemian.com/lists/30.html) | [医药](https://www.jiemian.com/lists/472.html) | [互联网](https://www.jiemian.com/lists/851.html) | [创投 ](https://www.jiemian.com/lists/858.html) | [能源](https://www.jiemian.com/lists/856.html) | [数码](https://www.jiemian.com/lists/853.html) | + | --------------------------------------------- | ---------------------------------------------- | ------------------------------------------------ | ----------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | + | 30 | 472 | 851 | 858 | 856 | 853 | + + | [教育](https://www.jiemian.com/lists/256.html) | [食品](https://www.jiemian.com/lists/845.html) | [新能源](https://www.jiemian.com/lists/857.html) | [家电](https://www.jiemian.com/lists/850.html) | [健康](https://www.jiemian.com/lists/854.html) | [酒业](https://www.jiemian.com/lists/676.html) | + | ---------------------------------------------- | ---------------------------------------------- | ------------------------------------------------ | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | + | 256 | 845 | 857 | 850 | 854 | 676 | + + | [物流](https://www.jiemian.com/lists/841.html) | [零售](https://www.jiemian.com/lists/847.html) | [美妆](https://www.jiemian.com/lists/838.html) | [楼市](https://www.jiemian.com/city/main/181.html) | [家居](https://www.jiemian.com/lists/694.html) | [餐饮](https://www.jiemian.com/lists/848.html) | + | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -------------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | + | 841 | 847 | 838 | city/main/181 | 694 | 848 | + + | [日用](https://www.jiemian.com/lists/846.html) | [企服](https://www.jiemian.com/lists/852.html) | [珠宝](https://www.jiemian.com/lists/839.html) | [腕表](https://www.jiemian.com/lists/840.html) | [ 商学院](https://www.jiemian.com/lists/605.html) | [元宇宙](https://www.jiemian.com/lists/704.html) | + | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ------------------------------------------------- | ------------------------------------------------ | + | 846 | 852 | 839 | 840 | 605 | 704 | + + | [电厂](https://www.jiemian.com/lists/872.html) | [农业](https://www.jiemian.com/lists/883.html) | + | ---------------------------------------------- | ---------------------------------------------- | + | 872 | 883 | + + #### [财经](https://www.jiemian.com/lists/800.html) + + | [金融](https://www.jiemian.com/lists/9.html) | [投资](https://www.jiemian.com/lists/86.html) | [证券](https://www.jiemian.com/lists/112.html) | [IPO](https://www.jiemian.com/lists/699.html) | [宏观](https://www.jiemian.com/lists/174.html) | [股市](https://www.jiemian.com/lists/418.html) | + | -------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | + | 9 | 86 | 112 | 699 | 174 | 418 | + + | [财富](https://www.jiemian.com/lists/410.html) | [有连云](https://www.jiemian.com/lists/889.html) | + | ---------------------------------------------- | ------------------------------------------------ | + | 410 | 889 | + + #### [新闻](https://www.jiemian.com/lists/801.html) + + | [天下](https://www.jiemian.com/lists/32.html) | [中国](https://www.jiemian.com/lists/71.html) | [ 评论](https://www.jiemian.com/lists/8.html) | [数据](https://www.jiemian.com/lists/154.html) | [职场](https://www.jiemian.com/lists/50.html) | [国是](https://www.jiemian.com/lists/422.html) | + | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | + | 32 | 71 | 8 | 154 | 50 | 422 | + + | [体育](https://www.jiemian.com/lists/82.html) | [文娱](https://www.jiemian.com/lists/63.html) | [ 影像](https://www.jiemian.com/lists/225.html) | [营销](https://www.jiemian.com/lists/49.html) | [大 湾区](https://www.jiemian.com/lists/680.html) | [ESG](https://www.jiemian.com/lists/712.html) | + | --------------------------------------------- | --------------------------------------------- | ----------------------------------------------- | --------------------------------------------- | ------------------------------------------------- | --------------------------------------------- | + | 82 | 63 | 225 | 49 | 680 | 712 | + + | [双碳](https://www.jiemian.com/lists/877.html) | [长三角](https://www.jiemian.com/lists/917.html) | + | ---------------------------------------------- | ------------------------------------------------ | + | 877 | 917 | + + #### [文化生活](https://www.jiemian.com/lists/130.html) + + | [文化](https://www.jiemian.com/lists/130.html) | [文旅](https://www.jiemian.com/lists/105.html) | [生活方式](https://www.jiemian.com/lists/135.html) | [美食美酒](https://www.jiemian.com/lists/865.html) | [艺术](https://www.jiemian.com/lists/643.html) | [游戏](https://www.jiemian.com/lists/118.html) | + | ---------------------------------------------- | ---------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | + | 130 | 105 | 135 | 865 | 643 | 118 | + + | [正午](https://www.jiemian.com/lists/53.html) | [箭厂](https://www.jiemian.com/video/lists/195_1.html) | + | --------------------------------------------- | ------------------------------------------------------ | + | 53 | video/lists/195\_1 | + + #### [快报](https://www.jiemian.com/lists/4.html) + + | [今日热点](https://www.jiemian.com/lists/1324kb.html) | [公司头条](https://www.jiemian.com/lists/1322kb.html) | [股市前沿](https://www.jiemian.com/lists/1327kb.html) | [监管通报](https://www.jiemian.com/lists/1330kb.html) | [财经速览](https://www.jiemian.com/lists/1326kb.html) | [时事追踪](https://www.jiemian.com/lists/1325kb.html) | + | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | + | 1324kb | 1322kb | 1327kb | 1330kb | 1326kb | 1325kb | +
+
+ +### VIP {#jie-mian-xin-wen-vip} + + + | [投资早晚报](https://www.jiemian.com/pro/lists/12.html) | [宏观晚 6 点](https://www.jiemian.com/pro/lists/20.html) | [打新早报](https://www.jiemian.com/pro/lists/21.html) | [盘前机会前瞻](https://www.jiemian.com/pro/lists/13.html) | [公告快评](https://www.jiemian.com/pro/lists/14.html) | [盘中必读](https://www.jiemian.com/pro/lists/15.html) | + | ------------------------------------------------------- | -------------------------------------------------------- | ----------------------------------------------------- | --------------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | + | 12 | 20 | 21 | 13 | 14 | 15 | + + | [金股挖掘](https://www.jiemian.com/pro/lists/16.html) | [调研早知道](https://www.jiemian.com/pro/lists/17.html) | [研报新知](https://www.jiemian.com/pro/lists/18.html) | [大势侦察](https://www.jiemian.com/pro/lists/1.html) | [市场风向标](https://www.jiemian.com/pro/lists/19.html) | + | ----------------------------------------------------- | ------------------------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------- | + | 16 | 17 | 18 | 1 | 19 | + + +### 界面号 {#jie-mian-xin-wen-jie-mian-hao} + + + | [财经号](https://www.jiemian.com/account/main/1.html) | [城市号](https://www.jiemian.com/account/main/2.html) | [媒体号](https://www.jiemian.com/account/main/3.html) | + | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | + | 1 | 2 | 3 | + + +### 视频 {#jie-mian-xin-wen-shi-pin} + + + | [界面 Vnews](https://www.jiemian.com/video/lists/258_1.html) | [直播](https://www.jiemian.com/videoLive/lists_1.html) | [箭厂](https://www.jiemian.com/video/lists/195_1.html) | [面谈](https://www.jiemian.com/video/lists/111_1.html) | [品牌创酷](https://www.jiemian.com/video/lists/226_1.html) | [番 茄社](https://www.jiemian.com/video/lists/567_1.html) | + | ------------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ---------------------------------------------------------- | --------------------------------------------------------- | + | 258\_1 | videoLive/lists\_1 | 195\_1 | 111\_1 | 226\_1 | 567\_1 | + + | [商业微史记](https://www.jiemian.com/video/lists/882_1.html) | + | ------------------------------------------------------------ | + | 882\_1 | + + +### 专题 {#jie-mian-xin-wen-zhuan-ti} + + ## 经济观察网 {#jing-ji-guan-cha-wang} From 4cde3afc682630fcc0a63d56199da4dd11947949 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Wed, 27 Dec 2023 14:24:15 +0800 Subject: [PATCH 9/9] feat: set default itunes_explicit to false, close #14093 --- lib/views/rss.art | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/views/rss.art b/lib/views/rss.art index 3bcaac41ac..a05e7889e6 100644 --- a/lib/views/rss.art +++ b/lib/views/rss.art @@ -16,7 +16,7 @@ i@diygod.me (DIYgod) {{ if itunes_author }}{{ itunes_author }}{{ /if }} {{ if itunes_category }}{{ /if }} - {{ if itunes_author }}{{ itunes_explicit || 'clean' }}{{ /if }} + {{ if itunes_author }}{{ itunes_explicit || 'false' }}{{ /if }} {{ language || 'zh-cn' }} {{ if image }}