feat(route): recover kuwaitlocal agirls qianp taiwannews jiaoliudao (#14247)
* fix: recover kuwaitlocal * fix: recover agirls * fix: recover qianp * fix: recover taiwannews * fix: recover hket * fix: recover jiaoliudao * fix: qianp * fix: deepscan issue
This commit is contained in:
parent
352a7cf302
commit
50b32696fa
|
|
@ -1,24 +1,15 @@
|
|||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { CookieJar } = require('tough-cookie');
|
||||
const { baseUrl, parseArticle } = require('./utils');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const cookieJar = new CookieJar();
|
||||
const { category = '' } = ctx.params;
|
||||
const link = `${baseUrl}/posts${category ? `/${category}` : ''}`;
|
||||
|
||||
const response = await got({
|
||||
url: link,
|
||||
headers: {
|
||||
Referer: baseUrl,
|
||||
},
|
||||
cookieJar,
|
||||
});
|
||||
const response = await got(link);
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
let items = $('.ag-post-item__link')
|
||||
const list = $('.ag-post-item__link')
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
|
|
@ -28,7 +19,7 @@ module.exports = async (ctx) => {
|
|||
};
|
||||
});
|
||||
|
||||
items = await Promise.all(items.map((item) => ctx.cache.tryGet(item.link, () => parseArticle(item, link, cookieJar))));
|
||||
const items = await Promise.all(list.map((item) => ctx.cache.tryGet(item.link, () => parseArticle(item))));
|
||||
|
||||
ctx.state.data = {
|
||||
title: $('head title').text().trim(),
|
||||
|
|
@ -37,13 +28,4 @@ module.exports = async (ctx) => {
|
|||
item: items,
|
||||
language: $('html').attr('lang'),
|
||||
};
|
||||
|
||||
ctx.state.json = {
|
||||
title: $('head title').text().trim(),
|
||||
link,
|
||||
description: $('head meta[name=description]').attr('content'),
|
||||
item: items,
|
||||
language: $('html').attr('lang'),
|
||||
cookieJar,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
module.exports = {
|
||||
'/topic/:topic': ['TonyRL'],
|
||||
'/topic_list': ['TonyRL'],
|
||||
'/:category?': ['TonyRL'],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,16 +4,22 @@ module.exports = {
|
|||
agirls: [
|
||||
{
|
||||
title: '分類',
|
||||
docs: 'https://docs.rsshub.app/routes/new-media##dian-ta-shao-nu',
|
||||
docs: 'https://docs.rsshub.app/routes/new-media#dian-ta-shao-nv',
|
||||
source: ['/posts/:category'],
|
||||
target: '/agirls/:category',
|
||||
},
|
||||
{
|
||||
title: '精選主題列表',
|
||||
docs: 'https://docs.rsshub.app/routes/new-media##dian-ta-shao-nu',
|
||||
docs: 'https://docs.rsshub.app/routes/new-media#dian-ta-shao-nv',
|
||||
source: ['/', '/topic'],
|
||||
target: '/agirls/topic_list',
|
||||
},
|
||||
{
|
||||
title: '精选主题',
|
||||
docs: 'https://docs.rsshub.app/routes/new-media#dian-ta-shao-nv',
|
||||
source: ['/topic/:topic'],
|
||||
target: '/agirls/topic/:topic',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
module.exports = function (router) {
|
||||
module.exports = (router) => {
|
||||
router.get('/topic/:topic', require('./topic'));
|
||||
router.get('/topic_list', require('./topic_list'));
|
||||
router.get('/:category?', require('./index'));
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { baseUrl, parseArticle } = require('./utils');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { topic } = ctx.params;
|
||||
const link = `${baseUrl}/topic/${topic}`;
|
||||
const response = await got(link);
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
const ldJson = JSON.parse($('script[type="application/ld+json"]').text());
|
||||
const list = $('.ag-post-item__link')
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
return {
|
||||
title: item.text().trim(),
|
||||
link: `${baseUrl}${item.attr('href')}`,
|
||||
};
|
||||
});
|
||||
|
||||
const items = await Promise.all(list.map((item) => ctx.cache.tryGet(item.link, () => parseArticle(item))));
|
||||
|
||||
ctx.state.data = {
|
||||
title: $('head title').text().trim(),
|
||||
link,
|
||||
description: ldJson['@graph'][0].description,
|
||||
item: items,
|
||||
language: $('html').attr('lang'),
|
||||
};
|
||||
};
|
||||
|
|
@ -6,12 +6,7 @@ module.exports = async (ctx) => {
|
|||
const category = 'topic';
|
||||
const link = `${baseUrl}/${category}`;
|
||||
|
||||
const response = await got({
|
||||
url: `${baseUrl}/${category}`,
|
||||
headers: {
|
||||
Referer: baseUrl,
|
||||
},
|
||||
});
|
||||
const response = await got(`${baseUrl}/${category}`);
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
|
|
@ -33,12 +28,4 @@ module.exports = async (ctx) => {
|
|||
item: items,
|
||||
language: $('html').attr('lang'),
|
||||
};
|
||||
|
||||
ctx.state.json = {
|
||||
title: $('head title').text().trim(),
|
||||
link,
|
||||
description: $('head meta[name=description]').attr('content'),
|
||||
item: items,
|
||||
language: $('html').attr('lang'),
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,14 +4,8 @@ const { parseDate } = require('@/utils/parse-date');
|
|||
|
||||
const baseUrl = 'https://agirls.aotter.net';
|
||||
|
||||
const parseArticle = async (item, referer, cookieJar) => {
|
||||
const detailResponse = await got({
|
||||
url: item.link,
|
||||
headers: {
|
||||
Referer: referer,
|
||||
},
|
||||
cookieJar,
|
||||
});
|
||||
const parseArticle = async (item) => {
|
||||
const detailResponse = await got(item.link);
|
||||
const content = cheerio.load(detailResponse.data);
|
||||
|
||||
item.category = [
|
||||
|
|
|
|||
|
|
@ -0,0 +1,139 @@
|
|||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
const timezone = require('@/utils/timezone');
|
||||
const path = require('path');
|
||||
const { art } = require('@/utils/render');
|
||||
|
||||
const urlMap = {
|
||||
srac: {
|
||||
baseUrl: 'https://china.hket.com',
|
||||
},
|
||||
sran: {
|
||||
baseUrl: 'https://inews.hket.com',
|
||||
},
|
||||
srat: {
|
||||
baseUrl: 'https://topick.hket.com',
|
||||
},
|
||||
sraw: {
|
||||
baseUrl: 'https://wealth.hket.com',
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { category = 'sran001' } = ctx.params;
|
||||
const baseUrl = urlMap[category.substring(0, 4)].baseUrl;
|
||||
|
||||
const { data: response } = await got(`${baseUrl}/${category}`);
|
||||
|
||||
const $ = cheerio.load(response);
|
||||
|
||||
const list = $('div.listing-title > a')
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
return {
|
||||
title: item.text().trim(),
|
||||
link: item.attr('href').startsWith('/')
|
||||
? // remove tracking parameters
|
||||
baseUrl + item.attr('href').split('?')[0].substring(0, item.attr('href').lastIndexOf('/'))
|
||||
: item.attr('href').split('?')[0].substring(0, item.attr('href').lastIndexOf('/')),
|
||||
};
|
||||
});
|
||||
|
||||
const items = await Promise.all(
|
||||
list.map((item) =>
|
||||
ctx.cache.tryGet(item.link, async () => {
|
||||
if (item.link.startsWith('https://invest.hket.com/') || item.link.startsWith('https://ps.hket.com/')) {
|
||||
let data;
|
||||
|
||||
if (item.link.startsWith('https://invest.hket.com/')) {
|
||||
data = await got.post('https://invest.hket.com/content-api-middleware/content', {
|
||||
headers: {
|
||||
referer: item.link,
|
||||
},
|
||||
json: {
|
||||
id: item.link.split('/').pop(),
|
||||
channel: 'invest',
|
||||
},
|
||||
});
|
||||
} else {
|
||||
data = await got('https://data02.hket.com/content', {
|
||||
headers: {
|
||||
referer: item.link,
|
||||
},
|
||||
searchParams: {
|
||||
id: item.link.split('/').pop(),
|
||||
channel: 'epc',
|
||||
},
|
||||
});
|
||||
}
|
||||
data = data.data;
|
||||
|
||||
item.pubDate = timezone(parseDate(data.displayDate), +8);
|
||||
item.updated = timezone(parseDate(data.lastModifiedDate), +8);
|
||||
item.author = data.authors?.map((e) => e.name).join(', ');
|
||||
item.description = data.content.full || data.content.partial;
|
||||
item.category = data.contentTags?.map((e) => e.name);
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
const { data: response } = await got(item.link);
|
||||
const $ = cheerio.load(response);
|
||||
|
||||
item.category = $('.contentTags-container > .hotkey-container-wrapper > .hotkey-container > a')
|
||||
.toArray()
|
||||
.map((e) => $(e).text().trim());
|
||||
|
||||
// remove unwanted elements
|
||||
$('source').remove();
|
||||
$('p.article-detail_caption, .article-extend-button, span.click-to-enlarge').remove();
|
||||
$('.loyalty-promotion-container, .relatedContents-container, .article-details-center-sharing-btn, .article-detail_login').remove();
|
||||
$('.gallery-related-container, .contentTags-container').remove();
|
||||
$('.listing-widget-126, div.template-default.hket-row.no-padding.detail-widget').remove();
|
||||
|
||||
// remove ads
|
||||
$('.ad_MobileMain, .adunit, .native-ad').remove();
|
||||
|
||||
$('span').each((_, e) => {
|
||||
if ($(e).text().startsWith('+')) {
|
||||
$(e).remove();
|
||||
}
|
||||
});
|
||||
|
||||
// fix lazyload image and caption
|
||||
$('img').each((_, e) => {
|
||||
e = $(e);
|
||||
e.replaceWith(
|
||||
art(path.join(__dirname, 'templates/image.art'), {
|
||||
alt: e.attr('data-alt'),
|
||||
src: e.attr('data-src') ?? e.attr('src'),
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
item.description = $('div.article-detail-body-container').html();
|
||||
item.pubDate = timezone(parseDate($('.article-details-info-container_date, .publish-date-time').text().trim()), +8);
|
||||
|
||||
return item;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: $('head meta[name=title]').attr('content').trim(),
|
||||
link: baseUrl + '/' + category,
|
||||
description: $('head meta[name=description]').attr('content').trim(),
|
||||
item: items,
|
||||
language: 'zh-hk',
|
||||
};
|
||||
|
||||
ctx.state.json = {
|
||||
title: $('head meta[name=title]').attr('content').trim(),
|
||||
link: baseUrl + '/' + category,
|
||||
description: $('head meta[name=description]').attr('content').trim(),
|
||||
item: items,
|
||||
language: 'zh-hk',
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
'/:category?': ['TonyRL'],
|
||||
};
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
module.exports = {
|
||||
'hket.com': {
|
||||
_name: '香港经济日报',
|
||||
china: [
|
||||
{
|
||||
title: '新闻',
|
||||
docs: 'https://docs.rsshub.app/routes/traditional-media#xiang-gang-jing-ji-ri-bao',
|
||||
source: ['/:category/*'],
|
||||
target: '/hket/:category',
|
||||
},
|
||||
],
|
||||
inews: [
|
||||
{
|
||||
title: '新闻',
|
||||
docs: 'https://docs.rsshub.app/routes/traditional-media#xiang-gang-jing-ji-ri-bao',
|
||||
source: ['/:category/*'],
|
||||
target: '/hket/:category',
|
||||
},
|
||||
],
|
||||
topick: [
|
||||
{
|
||||
title: '新闻',
|
||||
docs: 'https://docs.rsshub.app/routes/traditional-media#xiang-gang-jing-ji-ri-bao',
|
||||
source: ['/:category/*'],
|
||||
target: '/hket/:category',
|
||||
},
|
||||
],
|
||||
wealth: [
|
||||
{
|
||||
title: '新闻',
|
||||
docs: 'https://docs.rsshub.app/routes/traditional-media#xiang-gang-jing-ji-ri-bao',
|
||||
source: ['/:category/*'],
|
||||
target: '/hket/:category',
|
||||
},
|
||||
],
|
||||
www: [
|
||||
{
|
||||
title: '新闻',
|
||||
docs: 'https://docs.rsshub.app/routes/traditional-media#xiang-gang-jing-ji-ri-bao',
|
||||
source: ['/'],
|
||||
target: '/hket',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = (router) => {
|
||||
router.get('/:category?', require('./index'));
|
||||
};
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<figure>
|
||||
<img alt="{{ alt }}" src="{{ src }}">
|
||||
<figcaption>{{ alt }}</figcaption>
|
||||
</figure>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
const got = require('@/utils/got');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const baseUrl = 'https://www.jiaoliudao.com';
|
||||
const { data } = await got(`${baseUrl}/wp-json/wp/v2/posts`, {
|
||||
searchParams: {
|
||||
per_page: ctx.query.limit ? parseInt(ctx.query.limit, 10) : 30,
|
||||
},
|
||||
});
|
||||
|
||||
const items = data.map((item) => ({
|
||||
title: item.title.rendered,
|
||||
description: item.content.rendered,
|
||||
pubDate: parseDate(item.date_gmt),
|
||||
updated: parseDate(item.modified_gmt),
|
||||
link: item.link,
|
||||
}));
|
||||
|
||||
ctx.state.data = {
|
||||
title: '交流岛资源网-专注网络资源收集',
|
||||
image: `${baseUrl}/favicon.ico`,
|
||||
link: baseUrl,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
'/': ['TonyRL'],
|
||||
};
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
module.exports = {
|
||||
'jiaoliudao.com': {
|
||||
_name: '交流岛资源网',
|
||||
'.': [
|
||||
{
|
||||
title: '最新文章',
|
||||
docs: 'https://docs.rsshub.app/routes/blog#jiao-liu-dao-zi-yuan-wang',
|
||||
source: ['/'],
|
||||
target: '/jiaoliudao',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = (router) => {
|
||||
router.get('/', require('./index'));
|
||||
};
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const baseUrl = 'https://kuwaitlocal.com';
|
||||
const { category = 'latest' } = ctx.params;
|
||||
const url = `${baseUrl}/news/${category === 'latest' ? category : `categories/${category}`}`;
|
||||
|
||||
const { data: response } = await got(url);
|
||||
const $ = cheerio.load(response);
|
||||
const list = $('a.ggrid')
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
return {
|
||||
title: item.find('.txt').text().trim(),
|
||||
link: item.attr('href'),
|
||||
};
|
||||
});
|
||||
|
||||
const items = await Promise.all(
|
||||
list.map((item) =>
|
||||
ctx.cache.tryGet(item.link, async () => {
|
||||
const { data: response } = await got(item.link);
|
||||
const $ = cheerio.load(response);
|
||||
|
||||
item.pubDate = parseDate($('.single_news_meta span').eq(0).text().trim());
|
||||
item.category = $('.tags .tag')
|
||||
.toArray()
|
||||
.map((item) => $(item).text().trim());
|
||||
$('[id^=div-gpt-ad]').remove();
|
||||
$('.tags_sec2, .tags_sec, .comment').remove();
|
||||
item.description = $('.single_news_img').html() + $('#news_description').html();
|
||||
|
||||
return item;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: $('head title').text().trim(),
|
||||
description: $('head meta[name="description"]').attr('content').trim(),
|
||||
link: url,
|
||||
item: items,
|
||||
language: 'en',
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
module.exports = {
|
||||
'/': ['TonyRL'],
|
||||
'/:category?': ['TonyRL'],
|
||||
};
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
module.exports = {
|
||||
'kuwaitlocal.com': {
|
||||
_name: 'Kuwait Local',
|
||||
'.': [
|
||||
{
|
||||
title: 'Latest News',
|
||||
docs: 'https://docs.rsshub.app/routes/en/new-media#kuwait-local',
|
||||
source: ['/news/latest', '/news', '/'],
|
||||
target: '/kuwaitlocal',
|
||||
},
|
||||
{
|
||||
title: 'Categorised News',
|
||||
docs: 'https://docs.rsshub.app/routes/en/new-media#kuwait-local',
|
||||
source: ['/news/categories/:category'],
|
||||
target: '/kuwaitlocal/:category',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = (router) => {
|
||||
router.get('/:category?', require('./index'));
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
'/news/:path*': ['TonyRL'],
|
||||
};
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
const { getTokenAndSecret } = require('./utils');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const baseUrl = 'https://qianp.com';
|
||||
const { path = 'news/recommend' } = ctx.params;
|
||||
const url = `${baseUrl}/${path}/`;
|
||||
|
||||
const { token, secret } = await getTokenAndSecret(ctx.cache.tryGet);
|
||||
const headers = {
|
||||
cookie: token ? `t=${token}; r=${secret - 100}` : undefined,
|
||||
};
|
||||
const { data: response } = await got(url, {
|
||||
headers,
|
||||
});
|
||||
const $ = cheerio.load(response);
|
||||
|
||||
const list = $('.newslist .infor')
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
const a = item.find('a').first();
|
||||
return {
|
||||
title: a.attr('title'),
|
||||
link: a.attr('href'),
|
||||
};
|
||||
});
|
||||
|
||||
const items = await Promise.all(
|
||||
list.map((item) =>
|
||||
ctx.cache.tryGet(item.link, async () => {
|
||||
const { data: response } = await got(item.link, {
|
||||
headers,
|
||||
});
|
||||
const $ = cheerio.load(response);
|
||||
|
||||
item.category = [...new Set($('meta[name=keywords]').attr('content').split(','))];
|
||||
item.author = $('meta[name=author]').attr('content');
|
||||
item.pubDate = parseDate($('meta[property="bytedance:published_time"]').attr('content'));
|
||||
|
||||
item.description = $('.news_center').html();
|
||||
|
||||
return item;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: $('head title').text(),
|
||||
description: $('meta[name="description"]').attr('content'),
|
||||
link: url,
|
||||
image: `${baseUrl}/favicon.ico`,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
module.exports = {
|
||||
'qianp.com': {
|
||||
_name: '千篇网',
|
||||
'.': [
|
||||
{
|
||||
title: '知识库/资讯',
|
||||
docs: 'https://docs.rsshub.app/routes/new-media#qian-pian-wang',
|
||||
source: ['/*path'],
|
||||
target: (params) => (!params.path.endsWith('.html') ? `/qianp/news/${params.path}` : null),
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = (router) => {
|
||||
router.get('/news/:path*', require('./news'));
|
||||
};
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
const got = require('@/utils/got');
|
||||
|
||||
const getTokenAndSecret = (tryGet) =>
|
||||
tryGet('qianp:token', async () => {
|
||||
const response = await got('https://qianp.com/news/recommend/');
|
||||
const token = response.headers['set-cookie']
|
||||
.find((cookie) => cookie.startsWith('token='))
|
||||
?.split(';')[0]
|
||||
?.split('=')[1];
|
||||
const secret = response.headers['set-cookie']
|
||||
.find((cookie) => cookie.startsWith('secret='))
|
||||
?.split(';')[0]
|
||||
?.split('=')[1];
|
||||
return { token, secret };
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
getTokenAndSecret,
|
||||
};
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
const timezone = require('@/utils/timezone');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const baseUrl = 'https://www.taiwannews.com.tw';
|
||||
const { lang = 'en' } = ctx.params;
|
||||
const url = `${baseUrl}/${lang}/index`;
|
||||
const response = await got(url);
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
const list = $('.mod_group-columns .container-fluid .row')
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
const a = item.find('.entry-header a').first();
|
||||
return {
|
||||
title: a.attr('title'),
|
||||
link: new URL(a.attr('href'), baseUrl).href,
|
||||
pubDate: timezone(parseDate(item.find('.entry-date span').eq(1).text(), 'YYYY/MM/DD HH:mm'), +8),
|
||||
};
|
||||
})
|
||||
.filter((item) => item.title);
|
||||
|
||||
const items = await Promise.all(
|
||||
list.map((item) =>
|
||||
ctx.cache.tryGet(item.link, async () => {
|
||||
const response = await got(item.link);
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
item.author = $('.article-author').text();
|
||||
item.category = $('.tagcloud a')
|
||||
.toArray()
|
||||
.map((a) => $(a).attr('title'));
|
||||
|
||||
$('.article-head-wrapper, div[id^=div-gpt-ad-], div[class^=hidden-], footer').remove();
|
||||
$('.container-fluid').eq(2).remove();
|
||||
|
||||
item.description = $('.mod_single-column').html();
|
||||
return item;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: `${$('.categories').eq(0).text()} - ${$('head title').text()}`,
|
||||
description: $('meta[name="description"]').attr('content'),
|
||||
link: url,
|
||||
item: items,
|
||||
language: lang,
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
'/hot/:lang?': ['TonyRL'],
|
||||
};
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
module.exports = {
|
||||
'taiwannews.com.tw': {
|
||||
_name: '台灣英文新聞',
|
||||
'.': [
|
||||
{
|
||||
title: '最新熱門消息',
|
||||
docs: 'https://docs.rsshub.app/routes/traditional-media#tai-wan-ying-wen-xin-wen',
|
||||
source: '/:lang/index',
|
||||
target: '/taiwannews/hot/:lang',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = (router) => {
|
||||
router.get('/hot/:lang?', require('./hot'));
|
||||
};
|
||||
|
|
@ -360,6 +360,12 @@
|
|||
| drama\_deep | drama\_rating | drama\_column | drama\_interactive |
|
||||
</Route>
|
||||
|
||||
## 交流岛资源网 {#jiao-liu-dao-zi-yuan-wang}
|
||||
|
||||
### 最新文章 {#jiao-liu-dao-zi-yuan-wang-zui-xin-wen-zhang}
|
||||
|
||||
<Route author="TonyRL" example="/jiaoliudao" path="/jiaoliudao" radar="1" />
|
||||
|
||||
## 敬维博客 {#jing-wei-bo-ke}
|
||||
|
||||
### 文章 {#jing-wei-bo-ke-wen-zhang}
|
||||
|
|
|
|||
|
|
@ -313,8 +313,6 @@ TokenInsight also provides official RSS, you can take a look at [https://api.tok
|
|||
| -------- | -------- | -------- | -------- | -------- | -------- | -------- | ---------- |
|
||||
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|
||||
|
||||
## World Economic Forum 世界经济论坛 {#world-economic-forum-shi-jie-jing-ji-lun-tan}
|
||||
|
||||
## 巴伦周刊中文版 {#ba-lun-zhou-kan-zhong-wen-ban}
|
||||
|
||||
### 栏目 {#ba-lun-zhou-kan-zhong-wen-ban-lan-mu}
|
||||
|
|
|
|||
|
|
@ -884,6 +884,16 @@
|
|||
所以,如果您把`https://kotaku.com/latest`中的`latest`填入,该路由并不会正常工作
|
||||
</Route>
|
||||
|
||||
## Kuwait Local {#kuwait-local}
|
||||
|
||||
### Latest News {#kuwait-local-latest-news}
|
||||
|
||||
<Route author="TonyRL" example="/kuwaitlocal" path="/kuwaitlocal" radar="1" />
|
||||
|
||||
### Categorised News {#kuwait-local-categorised-news}
|
||||
|
||||
<Route author="TonyRL" example="/kuwaitlocal/article" path="/kuwaitlocal/:category?" paramsDesc={['Category name, can be found in URL, `latest` by default']} radar="1" />
|
||||
|
||||
## Letterboxd {#letterboxd}
|
||||
|
||||
### User diary {#letterboxd-user-diary}
|
||||
|
|
@ -2376,6 +2386,10 @@
|
|||
| app | phone | computer | accessories | tutorial | techlife |
|
||||
</Route>
|
||||
|
||||
### 精选主题 {#dian-ta-shao-nv-jing-xuan-zhu-ti}
|
||||
|
||||
<Route author="TonyRL" example="/agirls/topic/AppleWatch" path="/agirls/topic/:topic" paramsDesc={['精选主题,可通过下方精选主题列表获得']} radar="1" />
|
||||
|
||||
### 当前精选主题列表 {#dian-ta-shao-nv-dang-qian-jing-xuan-zhu-ti-lie-biao}
|
||||
|
||||
<Route author="TonyRL" example="/agirls/topic_list" path="/agirls/topic_list" radar="1" />
|
||||
|
|
@ -4036,6 +4050,12 @@
|
|||
- `fulltext`,全文输出,例如:`/pingwest/user/7781550877/article/fulltext`
|
||||
</Route>
|
||||
|
||||
## 千篇网 {#qian-pian-wang}
|
||||
|
||||
### 知识库 / 资讯 {#qian-pian-wang-zhi-shi-ku-zi-xun}
|
||||
|
||||
<Route author="TonyRL" example="/qianp/news" path="/qianp/news/:path*" paramsDesc={['路径,可在URL中找到,默认为 `news/recommend`']} radar="1" />
|
||||
|
||||
## 求是网 {#qiu-shi-wang}
|
||||
|
||||
### 分类 {#qiu-shi-wang-fen-lei}
|
||||
|
|
|
|||
|
|
@ -115,11 +115,13 @@ See [#app-store-mac-app-store](/routes/program-update#app-store-mac-app-store)
|
|||
|
||||
<Route author="hoilc" example="/clickme/default/category/beauty" path="/clickme/:site/:grouping/:name" paramsDesc={['站点,`default`为普通站,`r18`为成人站,其它值默认为普通站','分组方式,`category`为分类,`tag`为标签,其他值默认为分类','分类名或标签名,分类名为英文,可以在分类 URL 中找到']} radar="1" anticrawler="1" />
|
||||
|
||||
### South China Morning Post - China coronavirus outbreak {#clickme-south-china-morning-post-china-coronavirus-outbreak}
|
||||
## Corona Virus Disease 2019 {#corona-virus-disease-2019}
|
||||
|
||||
### South China Morning Post - China coronavirus outbreak {#corona-virus-disease-2019-south-china-morning-post-china-coronavirus-outbreak}
|
||||
|
||||
<Route author="DIYgod" example="/coronavirus/scmp" path="/coronavirus/scmp" notOperational="1" />
|
||||
|
||||
### Macao Pagina Electrónica Especial Contra Epidemias: What’s New {#clickme-macao-pagina-electronica-especial-contra-epidemias-what-s-new}
|
||||
### Macao Pagina Electrónica Especial Contra Epidemias: What’s New {#corona-virus-disease-2019-macao-pagina-electronica-especial-contra-epidemias-what-s-new}
|
||||
|
||||
Official Website: [https://www.ssm.gov.mo/apps1/PreventWuhanInfection/en.aspx](https://www.ssm.gov.mo/apps1/PreventWuhanInfection/en.aspx)
|
||||
|
||||
|
|
@ -129,11 +131,11 @@ Official Website: [https://www.ssm.gov.mo/apps1/PreventWuhanInfection/en.aspx](h
|
|||
| ------- | ------- | ---------- |
|
||||
| ch | en | pt |
|
||||
|
||||
### Singapore Ministry of Health - Past Updates on 2019-nCov Local Situation in Singapore {#clickme-singapore-ministry-of-health-past-updates-on-2019-ncov-local-situation-in-singapore}
|
||||
### Singapore Ministry of Health - Past Updates on 2019-nCov Local Situation in Singapore {#corona-virus-disease-2019-singapore-ministry-of-health-past-updates-on-2019-ncov-local-situation-in-singapore}
|
||||
|
||||
<Route author="Gnnng" example="/coronavirus/sg-moh" path="/coronavirus/sg-moh" notOperational="1" />
|
||||
|
||||
### Yahoo Japan 新型コロナウイルス感染症まとめ {#clickme-yahoo-japan-xin-xing-%E3%82%B3%E3%83%AD%E3%83%8A%E3%82%A6%E3%82%A4%E3%83%AB%E3%82%B9-gan-ran-zheng-%E3%81%BE%E3%81%A8%E3%82%81}
|
||||
### Yahoo Japan 新型コロナウイルス感染症まとめ {#corona-virus-disease-2019-yahoo-japan-xin-xing-%E3%82%B3%E3%83%AD%E3%83%8A%E3%82%A6%E3%82%A4%E3%83%AB%E3%82%B9-gan-ran-zheng-%E3%81%BE%E3%81%A8%E3%82%81}
|
||||
|
||||
Official Website: [https://news.yahoo.co.jp/pages/article/20200207](https://news.yahoo.co.jp/pages/article/20200207)
|
||||
|
||||
|
|
|
|||
|
|
@ -553,6 +553,12 @@ This route adds the missing photo and Link element. (Offical RSS doesn't have Li
|
|||
| Portuguese | portuguese |
|
||||
</Route>
|
||||
|
||||
## Taiwan News 台灣英文新聞 {#taiwan-news-tai-wan-ying-wen-xin-wen}
|
||||
|
||||
### Hot News {#taiwan-news-tai-wan-ying-wen-xin-wen-hot-news}
|
||||
|
||||
<Route author="TonyRL" example="/taiwannews/hot" path="/taiwannews/hot/:lang?" paramsDesc={['Language, `en` or `zh`, `en` by default']} radar="1" />
|
||||
|
||||
## The Atlantic {#the-atlantic}
|
||||
|
||||
### News {#the-atlantic-news}
|
||||
|
|
@ -2055,6 +2061,72 @@ This route adds the missing photo and Link element. (Offical RSS doesn't have Li
|
|||
`https://www.soundofhope.org/term/203` 对应 `/soundofhope/term/203`
|
||||
</Route>
|
||||
|
||||
## 香港经济日报 {#xiang-gang-jing-ji-ri-bao}
|
||||
|
||||
### 新闻 {#xiang-gang-jing-ji-ri-bao-xin-wen}
|
||||
|
||||
香港经济日报已有提供简单 RSS,详细可前往官方网站: [https://www.hket.com/rss](https://www.hket.com/rss)
|
||||
|
||||
此路由主要补全官方 RSS 全文输出及完善分类输出。
|
||||
|
||||
<Route author="TonyRL" example="/hket/sran001" path="/hket/:category?" paramsDesc={['分类,默认为全部新闻,可在 URL 中找到,部分见下表']} radar="1">
|
||||
<details>
|
||||
<summary>分类</summary>
|
||||
|
||||
| sran001 | sran008 | sran010 | sran011 | sran012 | srat006 |
|
||||
| -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| 全部新闻 | 财经地产 | 科技信息 | 国际新闻 | 商业新闻 | 香港新闻 |
|
||||
|
||||
| sran009 | sran009-1 | sran009-2 | sran009-3 | sran009-4 | sran009-5 | sran009-6 |
|
||||
| -------- | --------- | --------- | ---------- | --------- | --------- | --------- |
|
||||
| 即时财经 | 股市 | 新股 IPO | 新经济追踪 | 当炒股 | 宏观解读 | Hot Talk |
|
||||
|
||||
| sran011-1 | sran011-2 | sran011-3 |
|
||||
| --------- | ------------ | ------------ |
|
||||
| 环球政治 | 环球经济金融 | 环球社会热点 |
|
||||
|
||||
| sran016 | sran016-1 | sran016-2 | sran016-3 | sran016-4 | sran016-5 |
|
||||
| ---------- | ---------- | ---------- | ---------- | ---------- | -------------- |
|
||||
| 大湾区主页 | 大湾区发展 | 大湾区工作 | 大湾区买楼 | 大湾区消费 | 大湾区投资理财 |
|
||||
|
||||
| srac002 | srac003 | srac004 | srac005 |
|
||||
| -------- | -------- | -------- | -------- |
|
||||
| 即时中国 | 经济脉搏 | 国情动向 | 社会热点 |
|
||||
|
||||
| srat001 | srat008 | srat055 | srat069 | srat070 |
|
||||
| ------- | ------- | -------- | -------- | --------- |
|
||||
| 话题 | 观点 | 休闲消费 | 娱乐新闻 | TOPick TV |
|
||||
|
||||
| srat052 | srat052-1 | srat052-2 | srat052-3 |
|
||||
| -------- | --------- | ---------- | --------- |
|
||||
| 健康主页 | 食用安全 | 医生诊症室 | 保健美颜 |
|
||||
|
||||
| srat053 | srat053-1 | srat053-2 | srat053-3 | srat053-4 |
|
||||
| -------- | --------- | --------- | --------- | ---------- |
|
||||
| 亲子主页 | 儿童健康 | 育儿经 | 教育 | 亲子好去处 |
|
||||
|
||||
| srat053-6 | srat053-61 | srat053-62 | srat053-63 | srat053-64 |
|
||||
| ----------- | ---------- | ---------- | ---------- | ---------- |
|
||||
| Band 1 学堂 | 幼稚园 | 中小学 | 尖子教室 | 海外升学 |
|
||||
|
||||
| srat072-1 | srat072-2 | srat072-3 | srat072-4 |
|
||||
| ---------- | ---------- | ---------------- | ----------------- |
|
||||
| 健康身心活 | 抗癌新方向 | 「糖」「心」解密 | 风湿不再 你我自在 |
|
||||
|
||||
| sraw007 | sraw009 | sraw010 | sraw011 | sraw012 | sraw014 | sraw018 | sraw019 |
|
||||
| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| 全部博客 | Bloggers | 收息攻略 | 精明消费 | 退休规划 | 个人增值 | 财富管理 | 绿色金融 |
|
||||
|
||||
| sraw015 | sraw015-07 | sraw015-08 | sraw015-09 | sraw015-10 |
|
||||
| -------- | ---------- | ---------- | ---------- | ---------- |
|
||||
| 移民百科 | 海外置业 | 移民攻略 | 移民点滴 | 海外理财 |
|
||||
|
||||
| sraw020 | sraw020-1 | sraw020-2 | sraw020-3 | sraw020-4 |
|
||||
| -------- | ------------ | --------- | --------- | --------- |
|
||||
| ESG 主页 | ESG 趋势政策 | ESG 投资 | ESG 企业 | ESG 社会 |
|
||||
</details>
|
||||
</Route>
|
||||
|
||||
## 新华每日电讯 {#xin-hua-mei-ri-dian-xun}
|
||||
|
||||
### 今日 {#xin-hua-mei-ri-dian-xun-jin-ri}
|
||||
|
|
|
|||
Loading…
Reference in New Issue