mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-08-31 01:01:11 +08:00
feat: remove notOperational routes - social media
This commit is contained in:
@@ -313,21 +313,6 @@
|
||||
],
|
||||
},
|
||||
'ems.com.cn': { _name: '中国邮政速递物流', www: [{ title: '新闻', docs: 'https://docs.rsshub.app/routes/other#zhong-guo-you-zheng-su-di-wu-liu', source: '/aboutus/xin_wen_yu_shi_jian', target: '/ems/news' }] },
|
||||
'popiapp.cn': {
|
||||
_name: 'Popi 提问箱',
|
||||
www: [
|
||||
{
|
||||
title: '提问箱新回答',
|
||||
docs: 'https://docs.rsshub.app/routes/social-media#popi-ti-wen-xiang',
|
||||
source: '/:id',
|
||||
target: (params) => {
|
||||
if (params.id) {
|
||||
return '/popiask/:id';
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
'nppa.gov.cn': {
|
||||
_name: '国家新闻出版署',
|
||||
www: [
|
||||
|
||||
@@ -857,21 +857,6 @@ module.exports = {
|
||||
},
|
||||
],
|
||||
},
|
||||
'popiapp.cn': {
|
||||
_name: 'Popi 提问箱',
|
||||
www: [
|
||||
{
|
||||
title: '提问箱新回答',
|
||||
docs: 'https://docs.rsshub.app/routes/social-media#popi-ti-wen-xiang',
|
||||
source: '/:id',
|
||||
target: (params) => {
|
||||
if (params.id) {
|
||||
return '/popiask/:id';
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
'nppa.gov.cn': {
|
||||
_name: '国家新闻出版署',
|
||||
www: [
|
||||
|
||||
@@ -27,7 +27,6 @@ router.get('/ziroom/room/:city/:iswhole/:room/:keyword', lazyloadRouteHandler('.
|
||||
|
||||
// 简书
|
||||
router.get('/jianshu/home', lazyloadRouteHandler('./routes/jianshu/home'));
|
||||
router.get('/jianshu/trending/:timeframe', lazyloadRouteHandler('./routes/jianshu/trending'));
|
||||
router.get('/jianshu/collection/:id', lazyloadRouteHandler('./routes/jianshu/collection'));
|
||||
router.get('/jianshu/user/:id', lazyloadRouteHandler('./routes/jianshu/user'));
|
||||
|
||||
@@ -568,11 +567,6 @@ router.get('/idownloadblog', lazyloadRouteHandler('./routes/idownloadblog/index'
|
||||
// TesterHome
|
||||
router.get('/testerhome/newest', lazyloadRouteHandler('./routes/testerhome/newest'));
|
||||
|
||||
// 刷屏
|
||||
router.get('/weseepro/newest', lazyloadRouteHandler('./routes/weseepro/newest'));
|
||||
router.get('/weseepro/newest-direct', lazyloadRouteHandler('./routes/weseepro/newest-direct'));
|
||||
router.get('/weseepro/circle', lazyloadRouteHandler('./routes/weseepro/circle'));
|
||||
|
||||
// 玩物志
|
||||
router.get('/coolbuy/newest', lazyloadRouteHandler('./routes/coolbuy/newest'));
|
||||
|
||||
@@ -606,12 +600,6 @@ router.get('/steamgifts/discussions/:category?', lazyloadRouteHandler('./routes/
|
||||
router.get('/shanbay/checkin/:id', lazyloadRouteHandler('./routes/shanbay/checkin'));
|
||||
router.get('/shanbay/footprints/:category?', lazyloadRouteHandler('./routes/shanbay/footprints'));
|
||||
|
||||
// Facebook
|
||||
router.get('/facebook/page/:id', lazyloadRouteHandler('./routes/facebook/page'));
|
||||
|
||||
// 币乎
|
||||
router.get('/bihu/activaties/:id', lazyloadRouteHandler('./routes/bihu/activaties'));
|
||||
|
||||
// 停电通知
|
||||
router.get('/tingdiantz/nanjing', lazyloadRouteHandler('./routes/tingdiantz/nanjing'));
|
||||
router.get('/tingdiantz/95598/:province/:city/:district?', lazyloadRouteHandler('./routes/tingdiantz/95598'));
|
||||
@@ -796,9 +784,6 @@ router.get('/zjgsu/tzgg', lazyloadRouteHandler('./routes/universities/zjgsu/tzgg
|
||||
router.get('/zjgsu/gsgg', lazyloadRouteHandler('./routes/universities/zjgsu/gsgg/scripts'));
|
||||
router.get('/zjgsu/xszq', lazyloadRouteHandler('./routes/universities/zjgsu/xszq/scripts'));
|
||||
|
||||
// 大众点评
|
||||
router.get('/dianping/user/:id?', lazyloadRouteHandler('./routes/dianping/user'));
|
||||
|
||||
// 半月谈
|
||||
router.get('/banyuetan/byt/:time?', lazyloadRouteHandler('./routes/banyuetan/byt'));
|
||||
router.get('/banyuetan/:name', lazyloadRouteHandler('./routes/banyuetan'));
|
||||
@@ -1010,9 +995,6 @@ router.get('/huodongxing/explore', lazyloadRouteHandler('./routes/hdx/explore'))
|
||||
router.get('/8btc/:authorid', lazyloadRouteHandler('./routes/8btc/author'));
|
||||
router.get('/8btc/news/flash', lazyloadRouteHandler('./routes/8btc/news/flash'));
|
||||
|
||||
// VueVlog
|
||||
router.get('/vuevideo/:userid', lazyloadRouteHandler('./routes/vuevideo/user'));
|
||||
|
||||
// LWN.net Alerts
|
||||
router.get('/lwn/alerts/:distributor', lazyloadRouteHandler('./routes/lwn/alerts'));
|
||||
|
||||
@@ -1836,12 +1818,6 @@ router.get('/amazfitwatchfaces/search/:model/:keyword?/:sortBy?', lazyloadRouteH
|
||||
router.get('/missevan/drama/latest', lazyloadRouteHandler('./routes/missevan/latest'));
|
||||
router.get('/missevan/drama/:id', lazyloadRouteHandler('./routes/missevan/drama'));
|
||||
|
||||
// popiask提问箱
|
||||
router.get('/popiask/:sharecode/:pagesize?', lazyloadRouteHandler('./routes/popiask/questions'));
|
||||
|
||||
// Tapechat提问箱
|
||||
router.get('/tapechat/questionbox/:sharecode/:pagesize?', lazyloadRouteHandler('./routes/popiask/tapechat_questions'));
|
||||
|
||||
// AMD
|
||||
router.get('/amd/graphicsdrivers/:id/:rid?', lazyloadRouteHandler('./routes/amd/graphicsdrivers'));
|
||||
|
||||
@@ -1914,9 +1890,6 @@ router.get('/kotaku/story/:type', lazyloadRouteHandler('./routes/kotaku/story'))
|
||||
// 梅斯医学
|
||||
router.get('/medsci/recommend', lazyloadRouteHandler('./routes/medsci/recommend'));
|
||||
|
||||
// 悟空问答
|
||||
router.get('/wukong/user/:id/:type?', lazyloadRouteHandler('./routes/wukong/user'));
|
||||
|
||||
// 腾讯大数据
|
||||
router.get('/tencent/bigdata', lazyloadRouteHandler('./routes/tencent/bigdata/index'));
|
||||
|
||||
@@ -2406,7 +2379,6 @@ router.get('/feed-the-beast/modpack/:modpackEntry', lazyloadRouteHandler('./rout
|
||||
|
||||
// Gab
|
||||
router.get('/gab/user/:username', lazyloadRouteHandler('./routes/gab/user'));
|
||||
router.get('/gab/popular/:sort?', lazyloadRouteHandler('./routes/gab/explore'));
|
||||
|
||||
// Phrack Magazine
|
||||
router.get('/phrack', lazyloadRouteHandler('./routes/phrack/index'));
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
const url = require('url');
|
||||
|
||||
const api = 'https://be02.bihu.com/bihube-pc/bihu/user/getUserContentList/';
|
||||
const articleHost = 'https://bihu.com/article/';
|
||||
const host = 'https://bihu.com/people/';
|
||||
const getArticleApi = 'https://be02.bihu.com/bihube-pc/api/content/show/getArticle2/';
|
||||
const articleContent = 'https://oss02.bihu.com/';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
|
||||
const link = url.resolve(host, id);
|
||||
const response = await got.post(api, {
|
||||
queryUserId: id,
|
||||
pageNum: 1,
|
||||
});
|
||||
|
||||
const data = response.data.data;
|
||||
const contenList = data.list;
|
||||
|
||||
let author = '未知用户';
|
||||
let out = '';
|
||||
|
||||
for (let i = contenList.length - 1; i >= 0; i--) {
|
||||
if (contenList[i].type === 2) {
|
||||
contenList.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (contenList.length !== 0) {
|
||||
author = contenList[0].userName;
|
||||
|
||||
out = await Promise.all(
|
||||
contenList.map(async (item) => {
|
||||
const type = item.type;
|
||||
let description = item.content;
|
||||
let title = '动态';
|
||||
let itemLink = link;
|
||||
|
||||
// 文章
|
||||
if (type !== 1) {
|
||||
title = item.title;
|
||||
const contentId = item.contentId;
|
||||
itemLink = url.resolve(articleHost, contentId.toString());
|
||||
|
||||
const getArticleApiResponse = await got.post(getArticleApi, {
|
||||
artId: contentId,
|
||||
});
|
||||
|
||||
const articleContentPath = getArticleApiResponse.data.data.content;
|
||||
|
||||
const link = url.resolve(articleContent, articleContentPath);
|
||||
const articleContentResponse = await got.get(link);
|
||||
description = articleContentResponse.data;
|
||||
}
|
||||
|
||||
const single = {
|
||||
title,
|
||||
link: itemLink,
|
||||
author,
|
||||
description,
|
||||
pubDate: new Date(item.createTime).toUTCString(),
|
||||
};
|
||||
|
||||
return single;
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
ctx.state.data = {
|
||||
title: `币乎 - ${author}的动态`,
|
||||
link,
|
||||
item: out,
|
||||
};
|
||||
};
|
||||
@@ -1,98 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
const date = require('@/utils/date');
|
||||
|
||||
function addPictureAndVideo(item) {
|
||||
let content = '';
|
||||
content += item.pictureList ? item.pictureList.map((ele) => `<img src="${ele.picUrl}" />`).join('<br>') : '';
|
||||
content += item.videoUrl ? `<img src="${item.videoUrl}" />` : '';
|
||||
return content;
|
||||
}
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
|
||||
const userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1';
|
||||
const userPage = `https://m.dianping.com/userprofile/${id}`;
|
||||
|
||||
const pageResponse = await got({
|
||||
method: 'get',
|
||||
url: userPage,
|
||||
headers: {
|
||||
'User-Agent': userAgent,
|
||||
},
|
||||
});
|
||||
const nickNameReg = /window\.nickName = "(.*?)"/g;
|
||||
const nickName = nickNameReg.exec(pageResponse.data)[1];
|
||||
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: `https://m.dianping.com/member/ajax/NobleUserFeeds?userId=${id}`,
|
||||
headers: {
|
||||
'User-Agent': userAgent,
|
||||
Referer: userPage,
|
||||
},
|
||||
});
|
||||
|
||||
const data = response.data.data;
|
||||
const starMap = {
|
||||
0: '无',
|
||||
10: '一星',
|
||||
20: '二星',
|
||||
30: '三星',
|
||||
35: '三星半',
|
||||
40: '四星',
|
||||
45: '四星半',
|
||||
50: '五星',
|
||||
};
|
||||
const out = data.map((item) => {
|
||||
let link = '';
|
||||
let title = '';
|
||||
let content = '';
|
||||
const pubDate = date(item.addTime);
|
||||
const poi = item.poi ? `地点:<a href="http://www.dianping.com/shop/${item.poi.shopId}">${item.poi.name} - ${item.poi.regionCategory}</a>` : '';
|
||||
const poiName = item.poi ? item.poi.name : '';
|
||||
if (item.feedType === 1101) {
|
||||
// 签到成功
|
||||
link = `https://m.dianping.com/ugcdetail/${item.mainId}?sceneType=0&bizType=3`;
|
||||
content = poi;
|
||||
title = `签到成功: ${poiName} `;
|
||||
} else if (item.feedType === 101) {
|
||||
// 对商户、地点发布点评
|
||||
link = `https://m.dianping.com/ugcdetail/${item.mainId}?sceneType=0&bizType=1`;
|
||||
content = item.content.replace(/\n+/g, '<br>') + '<br>';
|
||||
content += `评分:${starMap[item.star]}<br>`;
|
||||
content += poi + '<br>';
|
||||
content += addPictureAndVideo(item);
|
||||
title = `发布点评: ${poiName}`;
|
||||
} else if (item.feedType === 131) {
|
||||
// 发布点评
|
||||
link = `https://m.dianping.com/ugcdetail/${item.mainId}?sceneType=0&bizType=29`;
|
||||
content = item.content.replace(/\n+/g, '<br>') + '<br>';
|
||||
content += addPictureAndVideo(item);
|
||||
title = `发布点评: ${content}`;
|
||||
} else if (item.feedType === 4208) {
|
||||
// 发布攻略
|
||||
link = `https://m.dianping.com/cityinsight/${item.mainId}`;
|
||||
content = item.content.replace(/\n+/g, '<br>') + '<br>';
|
||||
content += poi + '<br>';
|
||||
content += item.moreDesc ? `<a href='${link}'>${item.moreDesc}</a><br>` : '';
|
||||
content += addPictureAndVideo(item);
|
||||
title = `发布攻略: ${poiName}`;
|
||||
}
|
||||
|
||||
const info = {
|
||||
description: content,
|
||||
title,
|
||||
link,
|
||||
pubDate,
|
||||
};
|
||||
return info;
|
||||
});
|
||||
|
||||
ctx.state.data = {
|
||||
title: `大众点评 - ${nickName}`,
|
||||
link: userPage,
|
||||
description: `大众点评 - ${nickName}`,
|
||||
item: out,
|
||||
};
|
||||
};
|
||||
@@ -1,128 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
const fetchPageHtml = (linkPath, cacheKey, cache) => {
|
||||
const url = `https://mbasic.facebook.com${linkPath}`;
|
||||
|
||||
return cache.tryGet(cacheKey, async () => {
|
||||
const { data: html } = await got.get(url);
|
||||
return html;
|
||||
});
|
||||
};
|
||||
|
||||
const parseStoryPage = async (linkPath, cache) => {
|
||||
const { searchParams: q } = new URL('https://mbasic.facebook.com' + linkPath);
|
||||
const storyFbId = q.get('story_fbid');
|
||||
const storyId = q.get('id');
|
||||
const cacheKey = `story/${storyFbId}/${storyId}`;
|
||||
|
||||
const html = await fetchPageHtml(linkPath, cacheKey, cache);
|
||||
const $ = cheerio.load(html);
|
||||
|
||||
const url = `https://www.facebook.com/story.php?story_fbid=${storyFbId}&id=${storyId}`;
|
||||
const $story = $('#m_story_permalink_view').eq(0);
|
||||
const $box = $story.find('div > div > div > div').eq(0);
|
||||
const $header = $box.find('header').eq(0);
|
||||
const $content = $box.find('div > div').eq(0);
|
||||
$content.find('a[href^="https://lm.facebook.com/l.php"]').each((_, ele) => {
|
||||
const link = $(ele);
|
||||
const originalLink = new URL(link.attr('href')).searchParams.get('u');
|
||||
if (originalLink) {
|
||||
link.attr('href', decodeURIComponent(originalLink));
|
||||
}
|
||||
});
|
||||
const $attach = $story.find('div > div > div > div:nth-child(3)').eq(0);
|
||||
|
||||
const attachLinkList = $attach
|
||||
.find('a')
|
||||
.toArray()
|
||||
.map((a) => $(a).attr('href'));
|
||||
const isAttachAreImageSet = attachLinkList.filter((link) => new RegExp('/photos/').test(link)).length === attachLinkList.length;
|
||||
const title = $header.find('h3').text();
|
||||
|
||||
const content = $content.html();
|
||||
|
||||
let images = [];
|
||||
if (isAttachAreImageSet) {
|
||||
images = await Promise.all(attachLinkList.map((link) => parsePhotoPage(link, cache)));
|
||||
}
|
||||
|
||||
return {
|
||||
url,
|
||||
title,
|
||||
content,
|
||||
images,
|
||||
};
|
||||
};
|
||||
|
||||
const parsePhotoPage = async (linkPath, cache) => {
|
||||
const { pathname } = new URL('https://mbasic.facebook.com' + linkPath);
|
||||
const cacheKey = `photos${pathname}`;
|
||||
|
||||
const html = await fetchPageHtml(linkPath, cacheKey, cache);
|
||||
const $ = cheerio.load(html);
|
||||
|
||||
const title = $('#MPhotoContent div.msg > a > strong').first().text();
|
||||
const url = `https://www.facebook.com${pathname}`;
|
||||
const $content = $('#MPhotoContent div.msg > div');
|
||||
const content = $content.html();
|
||||
const image = $('#MPhotoContent div.desc.attachment > span > div > span > a[target=_blank].sec').attr('href');
|
||||
|
||||
return {
|
||||
title,
|
||||
url,
|
||||
content,
|
||||
image,
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { id } = ctx.params;
|
||||
const pageId = encodeURIComponent(id);
|
||||
const linkPath = `/${pageId}`;
|
||||
|
||||
const html = await fetchPageHtml(linkPath, pageId, ctx.cache);
|
||||
const $ = cheerio.load(html);
|
||||
|
||||
const itemLinks = $('footer > div:nth-child(2) > a:nth-child(1)')
|
||||
.toArray()
|
||||
.map((a) => $(a).attr('href'));
|
||||
|
||||
const items = await Promise.all(
|
||||
itemLinks.map(async (itemLink) => {
|
||||
if (new RegExp(`^/.+/photos/`).test(itemLink)) {
|
||||
const data = await parsePhotoPage(itemLink, ctx.cache);
|
||||
return {
|
||||
title: data.title,
|
||||
link: data.url,
|
||||
description: `<img src="${data.image}"><br>${data.content}`,
|
||||
};
|
||||
}
|
||||
if (new RegExp(`^/story.php`).test(itemLink)) {
|
||||
const data = await parseStoryPage(itemLink, ctx.cache);
|
||||
const isSingleImageStory = data.images.length === 1;
|
||||
const isEmptyImageList = data.images.length === 0;
|
||||
|
||||
let desc = '';
|
||||
desc += data.images.map((image) => `<img src="${image.image}"><br>${image.content}`).join('<br>');
|
||||
if (!isSingleImageStory) {
|
||||
!isEmptyImageList && (desc += '<br>');
|
||||
desc += data.content;
|
||||
}
|
||||
|
||||
return {
|
||||
title: data.title,
|
||||
link: data.url,
|
||||
description: desc,
|
||||
};
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: $('#m-timeline-cover-section h1 span').text(),
|
||||
link: `https://www.facebook.com/${pageId}`,
|
||||
description: $('#sub_profile_pic_content>div>div:nth-child(3) div>span').find('br').replaceWith('\n').text(),
|
||||
item: items.filter((item) => !!item),
|
||||
};
|
||||
};
|
||||
@@ -1,31 +0,0 @@
|
||||
const cheerio = require('cheerio');
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const sort = ctx.params.sort || 'hot';
|
||||
|
||||
let baseURL = 'https://gab.com/api/v1/timelines/explore?page=1&sort_by=';
|
||||
baseURL += sort === 'hot' ? 'hot' : 'top_today';
|
||||
|
||||
const response = await got.get(baseURL);
|
||||
|
||||
const result = await Promise.all(
|
||||
response.data.map((item) => {
|
||||
const media = item.media_attachments.map((item) => `<img src='${item.url}'>`).join('<br>');
|
||||
const $ = cheerio.load(item.content);
|
||||
|
||||
return {
|
||||
title: $.text() || 'Untitled',
|
||||
description: item.content + (media && '<br>' + media),
|
||||
link: item.url || baseURL,
|
||||
pubDate: new Date(item.created_at).toISOString(),
|
||||
};
|
||||
})
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: `Gab - Popular posts`,
|
||||
link: baseURL,
|
||||
item: result,
|
||||
};
|
||||
};
|
||||
@@ -1,28 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const util = require('./utils');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const link = `https://www.jianshu.com/trending/${ctx.params.timeframe}`;
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: link,
|
||||
headers: {
|
||||
Referer: link,
|
||||
},
|
||||
});
|
||||
|
||||
const data = response.data;
|
||||
|
||||
const $ = cheerio.load(data);
|
||||
const list = $('.note-list li').get();
|
||||
|
||||
const result = await util.ProcessFeed(list, ctx.cache);
|
||||
|
||||
ctx.state.data = {
|
||||
title: `简书 ${ctx.params.timeframe === 'weekly' ? '7' : '30'} 日热门`,
|
||||
link,
|
||||
description: `简书 ${ctx.params.timeframe === 'weekly' ? '7' : '30'} 日热门`,
|
||||
item: result,
|
||||
};
|
||||
};
|
||||
@@ -1,41 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const sharecode = ctx.params.sharecode;
|
||||
const pagesize = ctx.params.pagesize || 20;
|
||||
|
||||
const getUserInfo = await got({
|
||||
method: 'get',
|
||||
url: `https://apiv3.popiapp.cn/unuser/user/${sharecode}`,
|
||||
headers: {
|
||||
Referer: `https://www.popiapp.cn/${sharecode}`,
|
||||
},
|
||||
});
|
||||
|
||||
const nickname = getUserInfo.data.content.nickName;
|
||||
const production = getUserInfo.data.content.production;
|
||||
const description = getUserInfo.data.content.selfDescription;
|
||||
|
||||
const getQuestionFromUser = await got({
|
||||
method: 'get',
|
||||
url: `https://apiv3.popiapp.cn/unuser/getQuestionFromUser/${sharecode}?pageSize=${pagesize}`,
|
||||
headers: {
|
||||
Referer: `https://www.popiapp.cn/${sharecode}`,
|
||||
},
|
||||
});
|
||||
|
||||
const data = getQuestionFromUser.data.content.data;
|
||||
|
||||
ctx.state.data = {
|
||||
title: `${nickname} 的 popiask 提问箱`,
|
||||
link: `https://www.popiapp.cn/${sharecode}`,
|
||||
description: `${production} ${description}`,
|
||||
item: data.map((item) => ({
|
||||
title: item.title,
|
||||
description: `${item.title}<br>(${item.created_at})<br><br><b>答:</b><br>${item.answer.txt_content}<br>(${new Date(item.answer_at * 1000).toLocaleString()})`,
|
||||
guid: item.answer_at,
|
||||
pubDate: new Date(item.answer_at * 1000).toUTCString(),
|
||||
link: `https://www.popiapp.cn/answered.html?sharecode=${sharecode}&dynamicId=${item.visit_code}`,
|
||||
})),
|
||||
};
|
||||
};
|
||||
@@ -1,43 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const sharecode = ctx.params.sharecode;
|
||||
const pagesize = ctx.params.pagesize || 20;
|
||||
|
||||
const getUserInfo = await got({
|
||||
method: 'get',
|
||||
url: `https://apiv4.tapechat.net/unuser/userBox/${sharecode}`,
|
||||
headers: {
|
||||
Referer: `https://www.tapechat.net/${sharecode}`,
|
||||
},
|
||||
});
|
||||
|
||||
const nickname = getUserInfo.data.content.nickName;
|
||||
const production = getUserInfo.data.content.production;
|
||||
const avatar = getUserInfo.data.content.customPic;
|
||||
// const description = getUserInfo.data.content.selfDescription;
|
||||
|
||||
const getQuestionFromUser = await got({
|
||||
method: 'get',
|
||||
url: `https://apiv4.tapechat.net/unuser/getQuestionFromUser/${sharecode}?pageSize=${pagesize}`,
|
||||
headers: {
|
||||
Referer: `https://www.tapeask.net/${sharecode}`,
|
||||
},
|
||||
});
|
||||
|
||||
const data = getQuestionFromUser.data.content.data;
|
||||
|
||||
ctx.state.data = {
|
||||
title: `${nickname} 的 Tape 提问箱`,
|
||||
link: `https://www.tapechat.net/${sharecode}`,
|
||||
image: avatar,
|
||||
description: production,
|
||||
item: data.map((item) => ({
|
||||
title: item.title,
|
||||
description: `${item.title}<br>(${item.createdAt})<br><br><b>答:</b><br>${item.answer.txtContent}<br>(${new Date(item.answerAt * 1000).toLocaleString()})`,
|
||||
guid: item.visitCode,
|
||||
pubDate: new Date(item.answerAt * 1000).toUTCString(),
|
||||
link: `https://www.tapechat.net/answeredDetail.html?sharecode=${sharecode}&dynamicId=${item.visitCode}`,
|
||||
})),
|
||||
};
|
||||
};
|
||||
@@ -1,60 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const userid = ctx.params.userid;
|
||||
const url = `https://m.vuevideo.net/share/user/${userid}`;
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url,
|
||||
});
|
||||
|
||||
const data = response.data;
|
||||
const $ = cheerio.load(data);
|
||||
const list = $('#hotVideosUl li').get();
|
||||
const author = $('.infoItem.name').text();
|
||||
|
||||
const ProcessFeed = (data) => {
|
||||
const $ = cheerio.load(data);
|
||||
|
||||
$('#openBtn').html('APP播放');
|
||||
|
||||
// 提取内容
|
||||
return $('.videoContainer').html() + '<br>' + $('.footer').html();
|
||||
};
|
||||
|
||||
const items = await Promise.all(
|
||||
list.map(async (item) => {
|
||||
const $ = cheerio.load(item);
|
||||
const link = $('a').attr('href');
|
||||
|
||||
const cache = await ctx.cache.get(link);
|
||||
if (cache) {
|
||||
return Promise.resolve(JSON.parse(cache));
|
||||
}
|
||||
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: link,
|
||||
});
|
||||
|
||||
const description = ProcessFeed(response.data);
|
||||
|
||||
const single = {
|
||||
title: $('.videoTitle').text(),
|
||||
description,
|
||||
link,
|
||||
author,
|
||||
};
|
||||
ctx.cache.set(link, JSON.stringify(single));
|
||||
return Promise.resolve(single);
|
||||
})
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: $('title').text(),
|
||||
link: url,
|
||||
description: $('meta[property="og:description"]').attr('content') || $('title').text(),
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
@@ -1,38 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: 'https://www.weseepro.com/api/v1/message/stream/circle/2?end_uuid=&field_uuid=hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh',
|
||||
});
|
||||
|
||||
const data = response.data.data.field_messages;
|
||||
|
||||
ctx.state.data = {
|
||||
title: '刷屏-朋友圈',
|
||||
link: 'https://www.weseepro.com',
|
||||
item: data.map((item) => {
|
||||
const description = `${item.message.account.name}: ${item.message.message_text.content}`;
|
||||
let imgs = '';
|
||||
|
||||
if (item.message.link) {
|
||||
imgs = item.message.link.url.split(',').reduce((imgs, img) => {
|
||||
imgs += `
|
||||
<img src="${img}"/>
|
||||
`;
|
||||
return imgs;
|
||||
}, '');
|
||||
}
|
||||
|
||||
return {
|
||||
title: description,
|
||||
link: `https://www.weseepro.com/v/ask?uuid=${item.message_uuid}`,
|
||||
description: `
|
||||
${description}<br><br>
|
||||
${imgs}
|
||||
`,
|
||||
pubDate: new Date(item.message.message_text.add_time).toUTCString(),
|
||||
};
|
||||
}),
|
||||
};
|
||||
};
|
||||
@@ -1,69 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: 'https://www.weseepro.com/api/v1/message/ground/spam?pageNumber=1&pageSize=20',
|
||||
});
|
||||
|
||||
const data = response.data.data.data;
|
||||
const generateMessage = (message) => {
|
||||
let name = '';
|
||||
let content = '';
|
||||
|
||||
if (message.topMessage.account) {
|
||||
name = message.topMessage.account.name;
|
||||
content = message.topMessage.content.replace(/\n/g, '<br>');
|
||||
}
|
||||
|
||||
return `
|
||||
<img src="${message.link.img_url}"/><br><br>
|
||||
<a href="${message.link.url}">${message.link.summary}</a><br><br>
|
||||
<strong>${name}</strong>: ${content}<br><br>
|
||||
`;
|
||||
};
|
||||
|
||||
ctx.state.data = {
|
||||
title: '刷屏-最新(无中间页)',
|
||||
link: 'https://www.weseepro.com',
|
||||
item: data.map((item) => {
|
||||
let title;
|
||||
let link;
|
||||
let description;
|
||||
let pubDate;
|
||||
|
||||
if (item.data.spam) {
|
||||
const spam = item.data.spam;
|
||||
|
||||
title = spam.content;
|
||||
link = spam.link.url;
|
||||
description = generateMessage(spam);
|
||||
pubDate = new Date(spam.spam_add_time).toUTCString();
|
||||
} else if (item.data.special) {
|
||||
const special = item.data.special;
|
||||
const specialMessages = item.data.special_messages;
|
||||
const messages = specialMessages.reduce((messages, message) => {
|
||||
messages += generateMessage(message);
|
||||
return messages;
|
||||
}, '');
|
||||
|
||||
title = special.title;
|
||||
link = `https://www.weseepro.com/mine/album?uuid=${special.uuid}`;
|
||||
description = `
|
||||
<img src="${special.image}"/><br><br>
|
||||
${special.description}<br><br>
|
||||
${messages}
|
||||
`;
|
||||
} else {
|
||||
title = description = '未知类型,请点击<a href="https://github.com/DIYgod/RSSHub/issues">链接</a>提交issue';
|
||||
}
|
||||
|
||||
return {
|
||||
title,
|
||||
link,
|
||||
description,
|
||||
pubDate,
|
||||
};
|
||||
}),
|
||||
};
|
||||
};
|
||||
@@ -1,69 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: 'https://www.weseepro.com/api/v1/message/ground/spam?pageNumber=1&pageSize=20',
|
||||
});
|
||||
|
||||
const data = response.data.data.data;
|
||||
const generateMessage = (message) => {
|
||||
let name = '';
|
||||
let content = '';
|
||||
|
||||
if (message.topMessage.account) {
|
||||
name = message.topMessage.account.name;
|
||||
content = message.topMessage.content.replace(/\n/g, '<br>');
|
||||
}
|
||||
|
||||
return `
|
||||
<img src="${message.link.img_url}"/><br><br>
|
||||
<a href="${message.link.url}">${message.link.summary}</a><br><br>
|
||||
<strong>${name}</strong>: ${content}<br><br>
|
||||
`;
|
||||
};
|
||||
|
||||
ctx.state.data = {
|
||||
title: '刷屏-最新',
|
||||
link: 'https://www.weseepro.com',
|
||||
item: data.map((item) => {
|
||||
let title;
|
||||
let link;
|
||||
let description;
|
||||
let pubDate;
|
||||
|
||||
if (item.data.spam) {
|
||||
const spam = item.data.spam;
|
||||
|
||||
title = spam.content;
|
||||
link = `https://www.weseepro.com/mine/article?uuid=${spam.uuid}`;
|
||||
description = generateMessage(spam);
|
||||
pubDate = new Date(spam.spam_add_time).toUTCString();
|
||||
} else if (item.data.special) {
|
||||
const special = item.data.special;
|
||||
const specialMessages = item.data.special_messages;
|
||||
const messages = specialMessages.reduce((messages, message) => {
|
||||
messages += generateMessage(message);
|
||||
return messages;
|
||||
}, '');
|
||||
|
||||
title = special.title;
|
||||
link = `https://www.weseepro.com/mine/album?uuid=${special.uuid}`;
|
||||
description = `
|
||||
<img src="${special.image}"/><br><br>
|
||||
${special.description}<br><br>
|
||||
${messages}
|
||||
`;
|
||||
} else {
|
||||
title = description = '未知类型,请点击<a href="https://github.com/DIYgod/RSSHub/issues">链接</a>提交issue';
|
||||
}
|
||||
|
||||
return {
|
||||
title,
|
||||
link,
|
||||
description,
|
||||
pubDate,
|
||||
};
|
||||
}),
|
||||
};
|
||||
};
|
||||
@@ -1,93 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const rootUrl = 'https://www.wukong.com/wenda/web';
|
||||
const userUrl = `${rootUrl}/my/brow/?count=20&other_uid=${ctx.params.id}`;
|
||||
const dongtaiUrl = `${rootUrl}/dongtai/list/brow/?other_uid=${ctx.params.id}&count=15&max_time=&style=1`;
|
||||
const answerUrl = `${rootUrl}/my/brow/?count=15&t=${new Date().getTime()}&other_uid=${ctx.params.id}`;
|
||||
const questionUrl = `${rootUrl}/myquestion/brow/?count=15&t=${new Date().getTime()}&offset=0&other_uid=${ctx.params.id}`;
|
||||
|
||||
let number = '';
|
||||
let currentUrl = '';
|
||||
const type = ctx.params.type || 'dongtai';
|
||||
|
||||
switch (type) {
|
||||
case 'dongtai':
|
||||
number = '2';
|
||||
currentUrl = dongtaiUrl;
|
||||
break;
|
||||
case 'answers':
|
||||
number = '0';
|
||||
currentUrl = answerUrl;
|
||||
break;
|
||||
case 'questions':
|
||||
number = '1';
|
||||
currentUrl = questionUrl;
|
||||
break;
|
||||
}
|
||||
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: currentUrl,
|
||||
});
|
||||
const userResponse = await got({
|
||||
method: 'get',
|
||||
url: userUrl,
|
||||
});
|
||||
|
||||
let data = '';
|
||||
|
||||
switch (type) {
|
||||
case 'dongtai':
|
||||
data = response.data.data.dongtai_list;
|
||||
break;
|
||||
case 'answers':
|
||||
data = response.data.data.feed_question;
|
||||
break;
|
||||
case 'questions':
|
||||
data = response.data.question_list;
|
||||
break;
|
||||
}
|
||||
|
||||
const list = data.map((item) => {
|
||||
switch (type) {
|
||||
case 'dongtai': {
|
||||
if (item.cell_id === 0) {
|
||||
return Promise.resolve('');
|
||||
}
|
||||
const isQuestion = item.dongtai_cell.dongtai.OriginIdType === 1;
|
||||
return {
|
||||
title: `${item.dongtai_cell.dongtai.content.text}:${item.dongtai_cell.dongtai.base.question.title}`,
|
||||
link: isQuestion ? `https://www.wukong.com/question/${item.dongtai_cell.dongtai.base.question.qid}` : `https://www.wukong.com/answer/${item.dongtai_cell.dongtai.base.answer.ansid}`,
|
||||
description: isQuestion ? item.dongtai_cell.dongtai.base.question.content.text : item.dongtai_cell.dongtai.base.answer.content,
|
||||
pubDate: new Date((isQuestion ? item.dongtai_cell.dongtai.base.question.create_time : item.dongtai_cell.dongtai.base.answer.create_time) * 1000).toUTCString(),
|
||||
};
|
||||
}
|
||||
case 'answers': {
|
||||
return {
|
||||
title: item.question.title,
|
||||
link: `https://www.wukong.com/answer/${item.ans_list[0].ansid}`,
|
||||
description: item.ans_list[0].content,
|
||||
pubDate: new Date(item.ans_list[0].create_time * 1000).toUTCString(),
|
||||
};
|
||||
}
|
||||
case 'questions': {
|
||||
return {
|
||||
title: item.title,
|
||||
link: `https://www.wukong.com/question/${item.qid}`,
|
||||
description: item.content.text,
|
||||
pubDate: new Date(item.create_time * 1000).toUTCString(),
|
||||
};
|
||||
}
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
ctx.state.data = {
|
||||
title: `悟空问答 - ${userResponse.data.other_user_info.uname}`,
|
||||
link: `https://www.wukong.com/user/?uid=${ctx.params.id}&type=${number}`,
|
||||
item: list,
|
||||
description: userResponse.data.other_user_info.description,
|
||||
};
|
||||
};
|
||||
@@ -1,31 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: 'https://www.bilibili.com/activity/page/list?plat=1,2,3&mold=1&http=3&page=1&tid=0',
|
||||
headers: {
|
||||
Referer: 'https://www.bilibili.com/blackboard/topic_list.html',
|
||||
},
|
||||
});
|
||||
|
||||
const data = response.data.data.list;
|
||||
|
||||
ctx.state.data = {
|
||||
title: 'bilibili 话题列表',
|
||||
link: 'https://www.bilibili.com/blackboard/topic_list.html#/',
|
||||
description: 'bilibili 话题列表',
|
||||
item: data
|
||||
.filter(
|
||||
(item, index, array) =>
|
||||
// 由于某些话题在不同平台上是同时分开发布的,会产生重复,在这里去除
|
||||
!index || item.name !== array[index - 1].name
|
||||
)
|
||||
.map((item) => ({
|
||||
title: item.name,
|
||||
description: `${item.name}<br> ${item.desc}`,
|
||||
pubDate: new Date(item.ctime.replace(' ', 'T') + '+08:00').toUTCString(),
|
||||
link: item.pc_url,
|
||||
})),
|
||||
};
|
||||
};
|
||||
@@ -1,31 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const utils = require('./utils');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const channelId = ctx.params.channelid;
|
||||
const disableEmbed = ctx.params.disableEmbed;
|
||||
|
||||
const response = await got(`https://www.bilibili.com/v/channel/${channelId}/?tab=multiple`);
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
const data = JSON.parse(
|
||||
$('script:contains("window.__INITIAL_STATE__")')
|
||||
.text()
|
||||
.match(/window\.__INITIAL_STATE__=(\{.*?\});/)[1]
|
||||
);
|
||||
|
||||
const channel_name = data.channelDetailBanner.data.name;
|
||||
const list = data.flow[`getMultipleByIdx-lastId-channel_id-${channelId}-sort-hot`].result[0].items;
|
||||
|
||||
ctx.state.data = {
|
||||
title: `Bilibili${channel_name}频道排行榜`,
|
||||
link: `https://www.bilibili.com/v/channel/${channelId}?tab=multiple`,
|
||||
item: list.map((item) => ({
|
||||
title: item.name,
|
||||
description: `${item.name}${!disableEmbed ? `<br><br>${utils.iframe(null, null, item.bvid)}` : ''}<br><img src="${item.cover}">`,
|
||||
author: item.author_name,
|
||||
link: `https://www.bilibili.com/video/${item.bvid}`,
|
||||
})),
|
||||
};
|
||||
};
|
||||
@@ -1,10 +1,8 @@
|
||||
module.exports = {
|
||||
'/app/:id?': ['nczitzk'],
|
||||
'/audio/:id': ['LogicJake'],
|
||||
'/blackboard': ['Qixingchen'],
|
||||
'/bangumi/:seasonid': ['DIYgod'],
|
||||
'/bangumi/media/:mediaid': ['DIYgod'],
|
||||
'/channel/:channelid/hot/:disableEmbed?': ['3401797899'],
|
||||
'/fav/:uid/:fid/:disableEmbed?': ['Qixingchen'],
|
||||
'/followings/article/:uid': ['woshiluo'],
|
||||
'/followings/dynamic/:uid/:routeParams?': ['TigerCubDen', 'JimenezLi'],
|
||||
@@ -18,14 +16,12 @@ module.exports = {
|
||||
'/mall/ip/:id': ['DIYgod'],
|
||||
'/manga/update/:comicid': ['hoilc'],
|
||||
'/manga/followings/:uid/:limits?': ['yindaheng98'],
|
||||
'/online/:disableEmbed?': ['TigerCubDen'],
|
||||
'/partion/:tid/:disableEmbed?': ['DIYgod'],
|
||||
'/partion/ranking/:tid/:days?/:disableEmbed?': ['lengthmin'],
|
||||
'/platform/:area?/:p_type?/:uid?': ['nightmare-mio'],
|
||||
'/popular/all': ['ziminliu'],
|
||||
'/ranking/:rid?/:day?/:arc_type?/:disableEmbed?': ['DIYgod'],
|
||||
'/readlist/:listid': ['hoilc'],
|
||||
'/topic/:topic': ['Qixingchen'],
|
||||
'/user/article/:uid': ['lengthmin'],
|
||||
'/user/bangumi/:uid/:type?': ['wdssmq'],
|
||||
'/user/channel/:uid/:sid/:disableEmbed?': ['weirongxu'],
|
||||
@@ -36,7 +32,6 @@ module.exports = {
|
||||
'/user/followers/:uid/:loginUid': ['Qixingchen'],
|
||||
'/user/followings/:uid/:loginUid': ['Qixingchen'],
|
||||
'/user/video/:uid/:disableEmbed?': ['DIYgod'],
|
||||
'/user/video-all/:uid/:disableEmbed?': ['CcccFz'],
|
||||
'/video/danmaku/:bvid/:pid?': ['Qixingchen'],
|
||||
'/video/page/:bvid/:disableEmbed?': ['sxzz'],
|
||||
'/video/reply/:bvid': ['Qixingchen'],
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
const utils = require('./utils');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const disableEmbed = ctx.params.disableEmbed;
|
||||
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: 'https://www.bilibili.com/video/online.html',
|
||||
});
|
||||
const onlineList = JSON.parse(response.data.match(/window\.__INITIAL_STATE__=([\s\S]+);\(function\(\)/)[1]).onlineList || [];
|
||||
|
||||
ctx.state.data = {
|
||||
title: '哔哩哔哩 - 当前在线',
|
||||
link: 'https://www.bilibili.com/video/online.html',
|
||||
item: onlineList.map((item) => ({
|
||||
title: item.title,
|
||||
description: `${item.desc || item.title}${!disableEmbed ? `<br><br>${utils.iframe(item.aid, null, item.bvid)}` : ''}<br><img src="${item.pic}">`,
|
||||
pubDate: parseDate(item.pubdate * 1000),
|
||||
author: item.owner.name,
|
||||
link: `https://www.bilibili.com/video/${item.bvid}`,
|
||||
})),
|
||||
};
|
||||
};
|
||||
@@ -60,12 +60,6 @@ module.exports = {
|
||||
source: '/:uid',
|
||||
target: '/bilibili/user/video/:uid',
|
||||
},
|
||||
{
|
||||
title: 'UP 主所有视频',
|
||||
docs: 'https://docs.rsshub.app/routes/social-media#bilibili',
|
||||
source: '/:uid',
|
||||
target: '/bilibili/user/video-all/:uid',
|
||||
},
|
||||
{
|
||||
title: 'UP 主频道的合集',
|
||||
docs: 'https://docs.rsshub.app/routes/social-media#bilibili',
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
module.exports = (router) => {
|
||||
router.get('/app/:id?', require('./app'));
|
||||
router.get('/audio/:id', require('./audio'));
|
||||
router.get('/blackboard', require('./blackboard'));
|
||||
router.get('/bangumi/:seasonid', require('./bangumi')); // 弃用
|
||||
router.get('/bangumi/media/:mediaid', require('./bangumi'));
|
||||
router.get('/channel/:channelid/hot/:disableEmbed?', require('./channel'));
|
||||
router.get('/fav/:uid/:fid/:disableEmbed?', require('./fav'));
|
||||
router.get('/followings/article/:uid', require('./followings_article'));
|
||||
router.get('/followings/dynamic/:uid/:routeParams?', require('./followings_dynamic'));
|
||||
@@ -18,14 +16,12 @@ module.exports = (router) => {
|
||||
router.get('/mall/ip/:id', require('./mallIP'));
|
||||
router.get('/manga/update/:comicid', require('./manga_update'));
|
||||
router.get('/manga/followings/:uid/:limits?', require('./manga_followings'));
|
||||
router.get('/online/:disableEmbed?', require('./online'));
|
||||
router.get('/partion/:tid/:disableEmbed?', require('./partion'));
|
||||
router.get('/partion/ranking/:tid/:days?/:disableEmbed?', require('./partion-ranking'));
|
||||
router.get('/platform/:area?/:p_type?/:uid?', require('./platform'));
|
||||
router.get('/popular/all', require('./popular'));
|
||||
router.get('/ranking/:rid?/:day?/:arc_type?/:disableEmbed?', require('./ranking'));
|
||||
router.get('/readlist/:listid', require('./readlist'));
|
||||
router.get('/topic/:topic', require('./topic'));
|
||||
router.get('/user/article/:uid', require('./article'));
|
||||
router.get('/user/bangumi/:uid/:type?', require('./user_bangumi'));
|
||||
router.get('/user/channel/:uid/:sid/:disableEmbed?', require('./userChannel'));
|
||||
@@ -36,7 +32,6 @@ module.exports = (router) => {
|
||||
router.get('/user/followers/:uid/:loginUid', require('./followers'));
|
||||
router.get('/user/followings/:uid/:loginUid', require('./followings'));
|
||||
router.get('/user/video/:uid/:disableEmbed?', require('./video'));
|
||||
router.get('/user/video-all/:uid/:disableEmbed?', require('./video-all'));
|
||||
router.get('/video/danmaku/:bvid/:pid?', require('./danmaku'));
|
||||
router.get('/video/page/:bvid/:disableEmbed?', require('./page'));
|
||||
router.get('/video/reply/:bvid', require('./reply'));
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const topic = ctx.params.topic;
|
||||
const urlEncodedTopic = encodeURIComponent(topic);
|
||||
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: `https://api.vc.bilibili.com/topic_svr/v1/topic_svr/topic_new?topic_name=${urlEncodedTopic}`,
|
||||
headers: {
|
||||
Referer: `https://www.bilibili.com/tag/${urlEncodedTopic}/feed`,
|
||||
},
|
||||
transformResponse: [(data) => data],
|
||||
});
|
||||
const data = response.data.data.cards;
|
||||
|
||||
ctx.state.data = {
|
||||
title: `${topic} 的全部话题`,
|
||||
link: `https://www.bilibili.com/tag/${topic}/feed`,
|
||||
description: `https://www.bilibili.com/tag/${topic}/feed`,
|
||||
item: data.map((item) => {
|
||||
const parsed = JSON.parse(item.card);
|
||||
const cardData = parsed.item || parsed;
|
||||
|
||||
// img
|
||||
let imgHTML = '';
|
||||
if (cardData.pictures) {
|
||||
for (let i = 0; i < cardData.pictures.length; i++) {
|
||||
imgHTML += `<img src="${cardData.pictures[i].img_src}">`;
|
||||
}
|
||||
}
|
||||
if (cardData.pic) {
|
||||
imgHTML += `<img src="${cardData.pic}">`;
|
||||
}
|
||||
|
||||
// link
|
||||
let link = '';
|
||||
if (item.desc?.dynamic_id_str) {
|
||||
link = `https://t.bilibili.com/${item.desc.dynamic_id_str}`;
|
||||
}
|
||||
|
||||
return {
|
||||
title: cardData.title || cardData.description || cardData.content || (cardData.vest && cardData.vest.content),
|
||||
description: `${cardData.desc || cardData.description || cardData.content || cardData.summary || (cardData.vest && cardData.vest.content) + (cardData.sketch && cardData.sketch.title)}${imgHTML} `,
|
||||
pubDate: new Date(item.desc?.timestamp * 1000).toUTCString(),
|
||||
link,
|
||||
};
|
||||
}),
|
||||
};
|
||||
};
|
||||
@@ -1,74 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
const cache = require('./cache');
|
||||
const utils = require('./utils');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const uid = ctx.params.uid;
|
||||
const disableEmbed = ctx.params.disableEmbed;
|
||||
const cookie = await cache.getCookie(ctx);
|
||||
const verifyString = await cache.getVerifyString(ctx);
|
||||
const [name, face] = await cache.getUsernameAndFaceFromUID(ctx, uid);
|
||||
|
||||
await got(`https://space.bilibili.com/${uid}/video?tid=0&page=1&keyword=&order=pubdate`, {
|
||||
headers: {
|
||||
Referer: `https://space.bilibili.com/${uid}/`,
|
||||
Cookie: cookie,
|
||||
},
|
||||
});
|
||||
const params = utils.addVerifyInfo(`mid=${uid}&ps=30&tid=0&pn=1&keyword=&order=pubdate&platform=web&web_location=1550101&order_avoided=true`, verifyString);
|
||||
const response = await got(`https://api.bilibili.com/x/space/wbi/arc/search?${params}`, {
|
||||
headers: {
|
||||
Referer: `https://space.bilibili.com/${uid}/video?tid=0&page=1&keyword=&order=pubdate`,
|
||||
Cookie: cookie,
|
||||
},
|
||||
});
|
||||
|
||||
const vlist = [...response.data.data.list.vlist];
|
||||
const pageTotal = Math.ceil(response.data.data.page.count / response.data.data.page.ps);
|
||||
|
||||
const getPage = async (pageId) => {
|
||||
const cookie = await cache.getCookie(ctx);
|
||||
await got(`https://space.bilibili.com/${uid}/video?tid=0&page=${pageId}&keyword=&order=pubdate`, {
|
||||
headers: {
|
||||
Referer: `https://space.bilibili.com/${uid}/`,
|
||||
Cookie: cookie,
|
||||
},
|
||||
});
|
||||
const params = utils.addVerifyInfo(`mid=${uid}&ps=30&tid=0&pn=${pageId}&keyword=&order=pubdate&platform=web&web_location=1550101&order_avoided=true`, verifyString);
|
||||
return got(`https://api.bilibili.com/x/space/wbi/arc/search?${params}`, {
|
||||
headers: {
|
||||
Referer: `https://space.bilibili.com/${uid}/video?tid=0&page=${pageId}&keyword=&order=pubdate`,
|
||||
Cookie: cookie,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const promises = [];
|
||||
|
||||
if (pageTotal > 1) {
|
||||
for (let i = 2; i <= pageTotal; i++) {
|
||||
promises.push(getPage(i));
|
||||
}
|
||||
const rets = await Promise.all(promises);
|
||||
rets.forEach((ret) => {
|
||||
vlist.push(...ret.data.data.list.vlist);
|
||||
});
|
||||
}
|
||||
|
||||
ctx.state.data = {
|
||||
title: name,
|
||||
link: `https://space.bilibili.com/${uid}/video`,
|
||||
description: `${name} 的 bilibili 所有视频`,
|
||||
logo: face,
|
||||
icon: face,
|
||||
item: vlist.map((item) => ({
|
||||
title: item.title,
|
||||
description: `${item.description}${!disableEmbed ? `<br><br>${utils.iframe(item.aid)}` : ''}<br><img src="${item.pic}">`,
|
||||
pubDate: parseDate(item.created, 'X'),
|
||||
link: item.created > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`,
|
||||
author: name,
|
||||
comments: item.comment,
|
||||
})),
|
||||
};
|
||||
};
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ if item.metadata.full_text }}
|
||||
{{ if item.metadata?.full_text }}
|
||||
原文:{{@ item.metadata.full_text.replace(/\n/gm, '<br>') }}<br><br>
|
||||
{{ /if }}
|
||||
{{ if item.comments.length }}
|
||||
|
||||
@@ -3,13 +3,13 @@ module.exports = {
|
||||
_name: 'Instagram',
|
||||
www: [
|
||||
{
|
||||
title: '用户',
|
||||
title: 'User',
|
||||
docs: 'https://docs.rsshub.app/routes/social-media#instagram',
|
||||
source: ['/:id'],
|
||||
target: '/instagram/user/:id',
|
||||
},
|
||||
{
|
||||
title: '标签',
|
||||
title: 'Tags',
|
||||
docs: 'https://docs.rsshub.app/routes/social-media#instagram',
|
||||
source: ['/explore/tags/:key'],
|
||||
target: '/instagram/tags/:key',
|
||||
|
||||
@@ -24,10 +24,6 @@
|
||||
:::
|
||||
</Route>
|
||||
|
||||
### UP 主所有视频 {#bilibili-up-zhu-suo-you-shi-pin}
|
||||
|
||||
<Route author="CcccFz" example="/bilibili/user/video-all/436361287" path="/bilibili/user/video-all/:uid/:disableEmbed?" paramsDesc={['用户 id, 可在 UP 主主页中找到', '默认为开启内嵌视频, 任意值为关闭']} anticrawler="1" radar="1" notOperational="1" />
|
||||
|
||||
### UP 主专栏 {#bilibili-up-zhu-zhuan-lan}
|
||||
|
||||
<Route author="lengthmin" example="/bilibili/user/article/334958638" path="/bilibili/user/article/:uid" paramsDesc={['用户 id, 可在 UP 主主页中找到']} radar="1" />
|
||||
@@ -235,10 +231,6 @@
|
||||
| 0 | 1 | 13 | 167 | 3 | 129 | 4 | 36 | 188 | 234 | 223 | 160 | 211 | 217 | 119 | 155 | 202 | 5 | 181 | 177 | 23 | 11 |
|
||||
</Route>
|
||||
|
||||
### 当前在线 {#bilibili-dang-qian-zai-xian}
|
||||
|
||||
<Route author="TigerCubDen" example="/bilibili/online" path="/bilibili/online/:disableEmbed?" paramsDesc={['默认为开启内嵌视频, 任意值为关闭']} notOperational="1" />
|
||||
|
||||
### 用户关注动态 {#bilibili-yong-hu-guan-zhu-dong-tai}
|
||||
|
||||
<Route author="TigerCubDen JimenezLi" example="/bilibili/followings/dynamic/109937383" path="/bilibili/followings/dynamic/:uid/:routeParams?" paramsDesc={['用户 id', '额外参数;请参阅 [#UP 主动态](#bilibili-up-zhu-dong-tai) 的说明和表格']} configRequired="1">
|
||||
@@ -283,10 +275,6 @@
|
||||
|
||||
见 [#哔哩哔哩直播](/routes/live#bi-li-bi-li-zhi-bo)
|
||||
|
||||
### 主站话题列表 {#bilibili-zhu-zhan-hua-ti-lie-biao}
|
||||
|
||||
<Route author="Qixingchen" example="/bilibili/blackboard" path="/bilibili/blackboard" notOperational="1" />
|
||||
|
||||
### 会员购新品上架 {#bilibili-hui-yuan-gou-xin-pin-shang-jia}
|
||||
|
||||
<Route author="DIYgod" example="/bilibili/mall/new/1" path="/bilibili/mall/new/:category?" paramsDesc={['分类,默认全部,见下表']}>
|
||||
@@ -325,10 +313,6 @@
|
||||
| 0 | 1 | 168 | 3 | 129 | 4 | 36 | 188 | 160 | 119 | 155 | 5 | 181 |
|
||||
</Route>
|
||||
|
||||
### 话题 (频道 / 标签) {#bilibili-hua-ti-pin-dao-biao-qian}
|
||||
|
||||
<Route author="Qixingchen" example="/bilibili/topic/2233" path="/bilibili/topic/:topic" paramsDesc={['话题名(又称频道名或标签) 例如 2233 或 COSPLAY']} notOperational="1" />
|
||||
|
||||
### 歌单 {#bilibili-ge-dan}
|
||||
|
||||
<Route author="LogicJake" example="/bilibili/audio/10624" path="/bilibili/audio/:id" paramsDesc={['歌单 id, 可在歌单页 URL 中找到']} />
|
||||
@@ -353,10 +337,6 @@
|
||||
:::
|
||||
</Route>
|
||||
|
||||
### 频道排行榜 {#bilibili-pin-dao-pai-hang-bang}
|
||||
|
||||
<Route author="3401797899" example="/bilibili/channel/5417/hot" path="/bilibili/channel/:channelid/hot/:disableEmbed?" paramsDesc={['频道id,可在频道链接中找到', '默认为开启内嵌视频, 任意值为关闭']} notOperational="1" />
|
||||
|
||||
## Bluesky (bsky) {#bluesky-bsky}
|
||||
|
||||
### Keywords {#bluesky-bsky-keywords}
|
||||
@@ -391,7 +371,7 @@
|
||||
|
||||
### User {#curius-user}
|
||||
|
||||
<Route author="Ovler-Young" example="/curius/links/yuu-yuu" path="/curius/links/:name" paramsDesc={['Username, can be found in URL']} notOperational="1" />
|
||||
<Route author="Ovler-Young" example="/curius/links/yuu-yuu" path="/curius/links/:name" paramsDesc={['Username, can be found in URL']} />
|
||||
|
||||
## Daily.dev {#daily-dev}
|
||||
|
||||
@@ -429,12 +409,6 @@
|
||||
|
||||
<Route author="DIYgod" path="/disqus/posts/:forum" example="/disqus/posts/diygod-me" paramsDesc={['forum, disqus name of the target website']} />
|
||||
|
||||
## Facebook {#facebook}
|
||||
|
||||
### Page {#facebook-page}
|
||||
|
||||
<Route author="maple3142" example="/facebook/page/SonetPCR" path="/facebook/page/:id" paramsDesc={['page id']} anticrawler="1" notOperational="1" />
|
||||
|
||||
## Fur Affinity {#fur-affinity}
|
||||
|
||||
### Home {#fur-affinity-home}
|
||||
@@ -509,10 +483,6 @@
|
||||
|
||||
<Route author="zphw" example="/gab/user/realdonaldtrump" path="/gab/user/:username" paramsDesc={['Username']} />
|
||||
|
||||
### Popular Posts {#gab-popular-posts}
|
||||
|
||||
<Route author="zphw" example="/gab/popular/hot" path="/gab/popular/:sort?" paramsDesc={['Sort by, `hot` to be Hot Posts and `top` to be Top Posts. Default: hot']} notOperational="1" />
|
||||
|
||||
## GETTR {#gettr}
|
||||
|
||||
### User timeline {#gettr-user-timeline}
|
||||
@@ -551,6 +521,25 @@ Due to [Instagram Private API](https://github.com/dilame/instagram-private-api)
|
||||
|
||||
<Route author="oppilate DIYgod" example="/instagram/user/stefaniejoosten" path="/instagram/:category/:key" paramsDesc={['Feed category, see table above','Username / Hashtag name']} radar="1" anticrawler="1" configRequired="1" />
|
||||
|
||||
### User Profile - Picnob {#instagram-user-profile-picnob}
|
||||
|
||||
<Route author="TonyRL" example="/picnob/user/stefaniejoosten" path="/picnob/profile/:id" paramsDesc={['Instagram id']} radar="1" />
|
||||
|
||||
### User Profile - Picuki {#instagram-user-profile-picuki}
|
||||
|
||||
<Route author="hoilc Rongronggg9" example="/picuki/profile/stefaniejoosten" path="/picuki/profile/:id/:functionalFlag?" paramsDesc={['Instagram id','functional flag, see the table below']} radar="1" anticrawler="1">
|
||||
| functionalFlag | Video embedding | Fetching Instagram Stories |
|
||||
| -------------- | --------------------------------------- | -------------------------- |
|
||||
| 0 | off, only show video poster as an image | off |
|
||||
| 1 (default) | on | off |
|
||||
| 10 | on | on |
|
||||
|
||||
:::warning
|
||||
Instagram Stories do not have a reliable guid. It is possible that your RSS reader show the same story more than once.
|
||||
Though, every Story expires after 24 hours, so it may be not so serious.
|
||||
:::
|
||||
</Route>
|
||||
|
||||
## Keep {#keep}
|
||||
|
||||
### 运动日记 {#keep-yun-dong-ri-ji}
|
||||
@@ -630,29 +619,6 @@ If the instance address is not `mastodon.social` or `pawoo.net`, then the route
|
||||
|
||||
<Route author="hoilc" example="/piapro/public/music/miku/2" path="/piapro/public/:type/:tag?/:category?" paramsDesc={['work type, can be `music`,`illust`,`text`','`tag` parameter in url','category ID, `categoryId` parameter in url']} />
|
||||
|
||||
## Picnob {#picnob}
|
||||
|
||||
### User Profile {#picnob-user-profile}
|
||||
|
||||
<Route author="TonyRL" example="/picnob/user/stefaniejoosten" path="/picnob/profile/:id" paramsDesc={['Instagram id']} radar="1" notOperational="1" />
|
||||
|
||||
## Picuki {#picuki}
|
||||
|
||||
### User Profile {#picuki-user-profile}
|
||||
|
||||
<Route author="hoilc Rongronggg9" example="/picuki/profile/stefaniejoosten" path="/picuki/profile/:id/:functionalFlag?" paramsDesc={['Instagram id','functional flag, see the table below']} radar="1" anticrawler="1">
|
||||
| functionalFlag | Video embedding | Fetching Instagram Stories |
|
||||
| -------------- | --------------------------------------- | -------------------------- |
|
||||
| 0 | off, only show video poster as an image | off |
|
||||
| 1 (default) | on | off |
|
||||
| 10 | on | on |
|
||||
|
||||
:::warning
|
||||
Instagram Stories do not have a reliable guid. It is possible that your RSS reader show the same story more than once.
|
||||
Though, every Story expires after 24 hours, so it may be not so serious.
|
||||
:::
|
||||
</Route>
|
||||
|
||||
## pixiv {#pixiv}
|
||||
|
||||
### User Bookmark {#pixiv-user-bookmark}
|
||||
@@ -739,12 +705,6 @@ If the instance address is not `mastodon.social` or `pawoo.net`, then the route
|
||||
|
||||
<Route author="TonyRL" path="/plurk/user/:user" example="/plurk/user/plurkoffice" paramsDesc={['User ID, can be found in URL']} radar="1" />
|
||||
|
||||
## Popi 提问箱 {#popi-ti-wen-xiang}
|
||||
|
||||
### 提问箱新回答 {#popi-ti-wen-xiang-ti-wen-xiang-xin-hui-da}
|
||||
|
||||
<Route author="AgFlore" example="/popiask/popi6666" path="/popiask/:sharecode/:pagesize?" paramsDesc={['提问箱 ID', '查看条数(默认为 20)']} radar="1" notOperational="1" />
|
||||
|
||||
## Rattibha {#rattibha}
|
||||
|
||||
### User Threads {#rattibha-user-threads}
|
||||
@@ -765,12 +725,6 @@ If the instance address is not `mastodon.social` or `pawoo.net`, then the route
|
||||
提供不同内容的 `pid`, 可以得到不同的热门瞬间推荐,如果想看多个种类的热门可以用 `/` 把不同的 `pid` 连起来,例如: `NXJiSlM5V21kamJWVlgvZUh1NEExdz09/MkM0amxSTUNiTEpLcHhzSlRzTEI1dz09`
|
||||
:::
|
||||
|
||||
## Tape 小纸条 {#tape-xiao-zhi-tiao}
|
||||
|
||||
### 提问箱新回答 {#tape-xiao-zhi-tiao-ti-wen-xiang-xin-hui-da}
|
||||
|
||||
<Route author="AgFlore" example="/tapechat/questionbox/TOAH7BBH" path="/tapechat/questionbox/:sharecode/:pagesize?" paramsDesc={['提问箱 ID', '查看条数(默认为 20)']} notOperational="1" />
|
||||
|
||||
## Telegram {#telegram}
|
||||
|
||||
### Channel {#telegram-channel}
|
||||
@@ -944,12 +898,6 @@ generates
|
||||
|
||||
<Route author="MisteryMonster" example="/vimeo/category/documentary/staffpicks" path="/vimeo/category/:category/:staffpicks?" paramsDesc={['Category name can get from url like `documentary` in [https://vimeo.com/categories/documentary/videos](https://vimeo.com/categories/documentary/videos) ', 'type `staffpicks` to sort with staffpicks']} radar="1" />
|
||||
|
||||
## VueVlog {#vuevlog}
|
||||
|
||||
### 用户 {#vuevlog-yong-hu}
|
||||
|
||||
<Route author="kt286" example="/vuevideo/971924215514" path="/vuevideo/:userid" paramsDesc={['用户ID, 可在对应页面的 URL 中找到']} notOperational="1" />
|
||||
|
||||
## YouTube {#youtube}
|
||||
|
||||
### User {#youtube-user}
|
||||
@@ -1052,24 +1000,12 @@ YouTube provides official RSS feeds for channels, for instance [https://www.yout
|
||||
| 1 | 2 | 3 | 4 | 5 |
|
||||
</Route>
|
||||
|
||||
## 币乎 {#bi-hu}
|
||||
|
||||
### 用户动态 {#bi-hu-yong-hu-dong-tai}
|
||||
|
||||
<Route author="LogicJake" example="/bihu/activaties/1478342200" path="/bihu/activaties/:id" paramsDesc={['用户 id']} notOperational="1" />
|
||||
|
||||
## 唱吧 {#chang-ba}
|
||||
|
||||
### 用户 {#chang-ba-yong-hu}
|
||||
|
||||
<Route author="kt286 xizeyoupan" example="/changba/skp6hhF59n48R-UpqO3izw" path="/changba/:userid" paramsDesc={['用户ID, 可在对应分享页面的 URL 中找到']} radar="1" supportPodcast="1" />
|
||||
|
||||
## 大众点评 {#da-zhong-dian-ping}
|
||||
|
||||
### 用户 {#da-zhong-dian-ping-yong-hu}
|
||||
|
||||
<Route author="brilon" example="/dianping/user/35185271" path="/dianping/user/:id" paramsDesc={['用户id,可在 URL 中找到']} notOperational="1" />
|
||||
|
||||
## 抖音 {#dou-yin}
|
||||
|
||||
:::warning
|
||||
@@ -1383,10 +1319,6 @@ YouTube provides official RSS feeds for channels, for instance [https://www.yout
|
||||
|
||||
<Route author="DIYgod HenryQW" example="/jianshu/home" path="/jianshu/home" />
|
||||
|
||||
### 热门 {#jian-shu-re-men}
|
||||
|
||||
<Route author="DIYgod HenryQW" example="/jianshu/trending/weekly" path="/jianshu/trending/:timeframe" paramsDesc={['按周 `weekly` 或 按月 `monthly`']} notOperational="1" />
|
||||
|
||||
### 专题 {#jian-shu-zhuan-ti}
|
||||
|
||||
<Route author="DIYgod HenryQW" example="/jianshu/collection/xYuZYD" path="/jianshu/collection/:id" paramsDesc={['专题 id, 可在专题页 URL 中找到']} />
|
||||
@@ -1503,20 +1435,6 @@ YouTube provides official RSS feeds for channels, for instance [https://www.yout
|
||||
| day | week | month | amount |
|
||||
</Route>
|
||||
|
||||
## 刷屏 {#shua-ping}
|
||||
|
||||
### 最新 {#shua-ping-zui-xin}
|
||||
|
||||
<Route author="xyqfer" example="/weseepro/newest" path="/weseepro/newest" notOperational="1" />
|
||||
|
||||
### 最新(无中间页) {#shua-ping-zui-xin-wu-zhong-jian-ye}
|
||||
|
||||
<Route author="xyqfer yefoenix" example="/weseepro/newest-direct" path="/weseepro/newest-direct" notOperational="1" />
|
||||
|
||||
### 朋友圈 {#shua-ping-peng-you-quan}
|
||||
|
||||
<Route author="xyqfer" example="/weseepro/circle" path="/weseepro/circle" notOperational="1" />
|
||||
|
||||
## 微博 {#wei-bo}
|
||||
|
||||
:::warning
|
||||
@@ -1615,18 +1533,6 @@ YouTube provides official RSS feeds for channels, for instance [https://www.yout
|
||||
|
||||
<Route author="kt286" example="/weibo/oasis/user/1990895721" path="/weibo/oasis/user/:userid" paramsDesc={['用户 id, 可在用户主页 URL 中找到']} />
|
||||
|
||||
## 悟空问答 {#wu-kong-wen-da}
|
||||
|
||||
### 用户动态 {#wu-kong-wen-da-yong-hu-dong-tai}
|
||||
|
||||
<Route author="nczitzk" example="/wukong/user/5826687196" path="/wukong/user/:id/:type?" paramsDesc={['用户ID,可在用户页 URL 中找到', '类型,可选 `dongtai` 即 动态,`answers` 即 回答,`questions` 即 提问,默认为 `dongtai`']} notOperational="1">
|
||||
:::tip
|
||||
用户的动态是一定时间范围内用户提出的问题和作出的回答,距离现在时间较久的问题和回答不会出现,此时选择 `dongtai` 用户动态是会缺失的。
|
||||
|
||||
同理选择 `answers` 和 `questions` 作为参数时,对于没有提出过问题和作出过回答的用户,其内容也会相应缺失。
|
||||
:::
|
||||
</Route>
|
||||
|
||||
## 小红书 {#xiao-hong-shu}
|
||||
|
||||
### 用户笔记 {#xiao-hong-shu-yong-hu-bi-ji}
|
||||
|
||||
@@ -51,11 +51,9 @@ RSSHub 提供下列 API:
|
||||
"/bilibili/live/search/:key/:order",
|
||||
"/bilibili/live/area/:areaID/:order",
|
||||
"/bilibili/fav/:uid/:fid",
|
||||
"/bilibili/blackboard",
|
||||
"/bilibili/mall/new",
|
||||
"/bilibili/mall/ip/:id",
|
||||
"/bilibili/ranking/:rid?/:day?",
|
||||
"/bilibili/topic/:topic"
|
||||
"/bilibili/ranking/:rid?/:day?"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user