mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-11 07:40:26 +08:00
chore: format
This commit is contained in:
@@ -1,10 +1,12 @@
|
|||||||
const got = require('@/utils/got');
|
const got = require('@/utils/got');
|
||||||
|
|
||||||
module.exports = async (ctx) => {
|
module.exports = async (ctx) => {
|
||||||
const list = (await got({
|
const list = (
|
||||||
|
await got({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: 'http://www.cneb.gov.cn/guoneinews/guoneidata/',
|
url: 'http://www.cneb.gov.cn/guoneinews/guoneidata/',
|
||||||
})).data.rollData;
|
})
|
||||||
|
).data.rollData;
|
||||||
|
|
||||||
const items = list.map((item) => {
|
const items = list.map((item) => {
|
||||||
const single = {
|
const single = {
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
const got = require('@/utils/got');
|
const got = require('@/utils/got');
|
||||||
|
|
||||||
module.exports = async (ctx) => {
|
module.exports = async (ctx) => {
|
||||||
const warningMessagesJsonp = (await got({
|
const warningMessagesJsonp = (
|
||||||
|
await got({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: 'http://uc.cneb.gov.cn:8080/getWarningMessages?callback=func&start=0&pagetype=PAGE1409368873582889&rows=100&_=' + +new Date(),
|
url: 'http://uc.cneb.gov.cn:8080/getWarningMessages?callback=func&start=0&pagetype=PAGE1409368873582889&rows=100&_=' + +new Date(),
|
||||||
})).data.trim();
|
})
|
||||||
|
).data.trim();
|
||||||
|
|
||||||
let warningMessages = [];
|
let warningMessages = [];
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
const got = require('@/utils/got');
|
const got = require('@/utils/got');
|
||||||
|
|
||||||
module.exports = async (ctx) => {
|
module.exports = async (ctx) => {
|
||||||
const data = (await got({
|
const data = (
|
||||||
|
await got({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: 'https://open-be.ele.me/dev/notice/list?curpage=1&perpage=200',
|
url: 'https://open-be.ele.me/dev/notice/list?curpage=1&perpage=200',
|
||||||
})).data;
|
})
|
||||||
|
).data;
|
||||||
|
|
||||||
ctx.state.data = {
|
ctx.state.data = {
|
||||||
title: '饿百零售开放平台-公告',
|
title: '饿百零售开放平台-公告',
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
const got = require('@/utils/got');
|
const got = require('@/utils/got');
|
||||||
|
|
||||||
module.exports = async (ctx) => {
|
module.exports = async (ctx) => {
|
||||||
const data = (await got({
|
const data = (
|
||||||
|
await got({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url: 'https://app-api.shop.ele.me/arena/invoke/?method=NoticeKeeperService.getBroadcastList',
|
url: 'https://app-api.shop.ele.me/arena/invoke/?method=NoticeKeeperService.getBroadcastList',
|
||||||
json: true,
|
json: true,
|
||||||
@@ -19,7 +20,8 @@ module.exports = async (ctx) => {
|
|||||||
},
|
},
|
||||||
ncp: '2.0.0',
|
ncp: '2.0.0',
|
||||||
},
|
},
|
||||||
})).data;
|
})
|
||||||
|
).data;
|
||||||
|
|
||||||
ctx.state.data = {
|
ctx.state.data = {
|
||||||
title: '饿了么商家开放平台-公告',
|
title: '饿了么商家开放平台-公告',
|
||||||
|
|||||||
@@ -4,13 +4,15 @@ const host = 'https://www.enclavebooks.cn';
|
|||||||
module.exports = async (ctx) => {
|
module.exports = async (ctx) => {
|
||||||
const id = ctx.params.id;
|
const id = ctx.params.id;
|
||||||
|
|
||||||
const categorys = (await got({
|
const categorys = (
|
||||||
|
await got({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: 'https://app.enclavebooks.cn/v2/discovery',
|
url: 'https://app.enclavebooks.cn/v2/discovery',
|
||||||
headers: {
|
headers: {
|
||||||
Referer: host,
|
Referer: host,
|
||||||
},
|
},
|
||||||
})).data.result.category;
|
})
|
||||||
|
).data.result.category;
|
||||||
|
|
||||||
let category_name, description;
|
let category_name, description;
|
||||||
for (let i = 0; i < categorys.length; i++) {
|
for (let i = 0; i < categorys.length; i++) {
|
||||||
@@ -22,13 +24,15 @@ module.exports = async (ctx) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const list = (await got({
|
const list = (
|
||||||
|
await got({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: `https://app.enclavebooks.cn/v1_9/getCategoryList?cateId=${id}&page=1`,
|
url: `https://app.enclavebooks.cn/v1_9/getCategoryList?cateId=${id}&page=1`,
|
||||||
headers: {
|
headers: {
|
||||||
Referer: host,
|
Referer: host,
|
||||||
},
|
},
|
||||||
})).data.result.data;
|
})
|
||||||
|
).data.result.data;
|
||||||
|
|
||||||
const out = await Promise.all(
|
const out = await Promise.all(
|
||||||
list.map(async (item) => {
|
list.map(async (item) => {
|
||||||
|
|||||||
@@ -3,13 +3,15 @@ const got = require('@/utils/got');
|
|||||||
module.exports = async (ctx) => {
|
module.exports = async (ctx) => {
|
||||||
const username = ctx.params.username;
|
const username = ctx.params.username;
|
||||||
|
|
||||||
const response = (await got({
|
const response = (
|
||||||
|
await got({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: `https://api.storiesig.com/stories/${username}`,
|
url: `https://api.storiesig.com/stories/${username}`,
|
||||||
headers: {
|
headers: {
|
||||||
Referer: `https://storiesig.com/?username=${username}`,
|
Referer: `https://storiesig.com/?username=${username}`,
|
||||||
},
|
},
|
||||||
})).data;
|
})
|
||||||
|
).data;
|
||||||
|
|
||||||
const items = response.items.map((item) => {
|
const items = response.items.map((item) => {
|
||||||
const image = item.image_versions2 && item.image_versions2.candidates[0].url;
|
const image = item.image_versions2 && item.image_versions2.candidates[0].url;
|
||||||
|
|||||||
@@ -11,7 +11,12 @@ module.exports = async (ctx) => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const items = response.data.data.recommendedActivityFeed.items.edges.map(({ node: { targets: [item] } }) => {
|
const items = response.data.data.recommendedActivityFeed.items.edges.map(
|
||||||
|
({
|
||||||
|
node: {
|
||||||
|
targets: [item],
|
||||||
|
},
|
||||||
|
}) => {
|
||||||
const content = item.content;
|
const content = item.content;
|
||||||
const title = content;
|
const title = content;
|
||||||
const guid = item.id;
|
const guid = item.id;
|
||||||
@@ -40,7 +45,8 @@ module.exports = async (ctx) => {
|
|||||||
pubDate,
|
pubDate,
|
||||||
author,
|
author,
|
||||||
};
|
};
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
ctx.state.data = {
|
ctx.state.data = {
|
||||||
title: '沸点 - 动态',
|
title: '沸点 - 动态',
|
||||||
|
|||||||
@@ -19,9 +19,11 @@ module.exports = async (ctx) => {
|
|||||||
const response = await ctx.cache.tryGet(
|
const response = await ctx.cache.tryGet(
|
||||||
e.link,
|
e.link,
|
||||||
async () =>
|
async () =>
|
||||||
(await got.get(e.link, {
|
(
|
||||||
|
await got.get(e.link, {
|
||||||
responseType: 'buffer',
|
responseType: 'buffer',
|
||||||
})).data
|
})
|
||||||
|
).data
|
||||||
);
|
);
|
||||||
const html = iconv.decode(response, 'gbk');
|
const html = iconv.decode(response, 'gbk');
|
||||||
const $ = cheerio.load(html, { decodeEntities: false });
|
const $ = cheerio.load(html, { decodeEntities: false });
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
const got = require('@/utils/got');
|
const got = require('@/utils/got');
|
||||||
|
|
||||||
module.exports = async (ctx) => {
|
module.exports = async (ctx) => {
|
||||||
const data = (await got({
|
const data = (
|
||||||
|
await got({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url: 'https://qiao.sf-express.com/menu/getListNews.pub',
|
url: 'https://qiao.sf-express.com/menu/getListNews.pub',
|
||||||
json: true,
|
json: true,
|
||||||
data: {},
|
data: {},
|
||||||
})).data;
|
})
|
||||||
|
).data;
|
||||||
|
|
||||||
ctx.state.data = {
|
ctx.state.data = {
|
||||||
title: '顺丰丰桥开放平台-公告',
|
title: '顺丰丰桥开放平台-公告',
|
||||||
|
|||||||
@@ -29,9 +29,11 @@ module.exports = async (ctx) => {
|
|||||||
const response = await ctx.cache.tryGet(
|
const response = await ctx.cache.tryGet(
|
||||||
itemUrl,
|
itemUrl,
|
||||||
async () =>
|
async () =>
|
||||||
(await got.get(itemUrl, {
|
(
|
||||||
|
await got.get(itemUrl, {
|
||||||
responseType: 'buffer',
|
responseType: 'buffer',
|
||||||
})).data
|
})
|
||||||
|
).data
|
||||||
);
|
);
|
||||||
const html = iconv.decode(response, 'gbk');
|
const html = iconv.decode(response, 'gbk');
|
||||||
const $ = cheerio.load(html, { decodeEntities: false });
|
const $ = cheerio.load(html, { decodeEntities: false });
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ const url = require('url');
|
|||||||
|
|
||||||
const host = 'http://cwc.njust.edu.cn/';
|
const host = 'http://cwc.njust.edu.cn/';
|
||||||
|
|
||||||
const map = new Map([[1, { title: '南京理工大学财务处 -- 新闻及通知', id: 'wp_news_w2' }], [2, { title: '南京理工大学财务处 -- 办事指南', id: 'wp_news_w3' }]]);
|
const map = new Map([
|
||||||
|
[1, { title: '南京理工大学财务处 -- 新闻及通知', id: 'wp_news_w2' }],
|
||||||
|
[2, { title: '南京理工大学财务处 -- 办事指南', id: 'wp_news_w3' }],
|
||||||
|
]);
|
||||||
|
|
||||||
module.exports = async (ctx) => {
|
module.exports = async (ctx) => {
|
||||||
const type = Number.parseInt(ctx.params.type);
|
const type = Number.parseInt(ctx.params.type);
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
const got = require('@/utils/got');
|
const got = require('@/utils/got');
|
||||||
const cheerio = require('cheerio');
|
const cheerio = require('cheerio');
|
||||||
|
|
||||||
const map = new Map([[1, { title: '南京理工大学研究生院 -- 通知公告', id: '/sytzgg_4568' }], [2, { title: '南京理工大学研究生院 -- 学术公告', id: '/xshdggl' }]]);
|
const map = new Map([
|
||||||
|
[1, { title: '南京理工大学研究生院 -- 通知公告', id: '/sytzgg_4568' }],
|
||||||
|
[2, { title: '南京理工大学研究生院 -- 学术公告', id: '/xshdggl' }],
|
||||||
|
]);
|
||||||
|
|
||||||
module.exports = async (ctx) => {
|
module.exports = async (ctx) => {
|
||||||
const type = Number.parseInt(ctx.params.type);
|
const type = Number.parseInt(ctx.params.type);
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ const url = require('url');
|
|||||||
const listUrl = 'https://it.swufe.edu.cn/index/';
|
const listUrl = 'https://it.swufe.edu.cn/index/';
|
||||||
const baseUrl = 'https://it.swufe.edu.cn/';
|
const baseUrl = 'https://it.swufe.edu.cn/';
|
||||||
|
|
||||||
const map = new Map([['xyxw', { title: '西南财经大学经济信息工程学院 -- 学院新闻', suffix: 'xyxw.htm' }], ['tzgg', { title: '西南财经大学经济信息工程学院 -- 通知公告', suffix: 'tzgg.htm' }]]);
|
const map = new Map([
|
||||||
|
['xyxw', { title: '西南财经大学经济信息工程学院 -- 学院新闻', suffix: 'xyxw.htm' }],
|
||||||
|
['tzgg', { title: '西南财经大学经济信息工程学院 -- 通知公告', suffix: 'tzgg.htm' }],
|
||||||
|
]);
|
||||||
|
|
||||||
module.exports = async (ctx) => {
|
module.exports = async (ctx) => {
|
||||||
const type = ctx.params.type || 'tzgg';
|
const type = ctx.params.type || 'tzgg';
|
||||||
|
|||||||
@@ -2,7 +2,10 @@ const got = require('@/utils/got');
|
|||||||
const cheerio = require('cheerio');
|
const cheerio = require('cheerio');
|
||||||
const util = require('./utils');
|
const util = require('./utils');
|
||||||
|
|
||||||
const map = new Map([[1, { title: '硕士招生 - 深圳大学研究生招生网' }], [2, { title: '博士招生 - 深圳大学研究生招生网' }]]);
|
const map = new Map([
|
||||||
|
[1, { title: '硕士招生 - 深圳大学研究生招生网' }],
|
||||||
|
[2, { title: '博士招生 - 深圳大学研究生招生网' }],
|
||||||
|
]);
|
||||||
|
|
||||||
module.exports = async (ctx) => {
|
module.exports = async (ctx) => {
|
||||||
let type = Number.parseInt(ctx.params.type);
|
let type = Number.parseInt(ctx.params.type);
|
||||||
|
|||||||
@@ -5,21 +5,25 @@ module.exports = async (ctx) => {
|
|||||||
const id = ctx.params.id;
|
const id = ctx.params.id;
|
||||||
const link = `https://vocus.cc/user/@${id}`;
|
const link = `https://vocus.cc/user/@${id}`;
|
||||||
|
|
||||||
const { _id, fullname, intro } = (await got({
|
const { _id, fullname, intro } = (
|
||||||
|
await got({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: `https://api.sosreader.com/api/users/${id}`,
|
url: `https://api.sosreader.com/api/users/${id}`,
|
||||||
headers: {
|
headers: {
|
||||||
Referer: link,
|
Referer: link,
|
||||||
},
|
},
|
||||||
})).data;
|
})
|
||||||
|
).data;
|
||||||
|
|
||||||
const { articles } = (await got({
|
const { articles } = (
|
||||||
|
await got({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: `https://api.sosreader.com/api/articles?userId=${_id}&num=10&status=2&sort=lastPublishAt`,
|
url: `https://api.sosreader.com/api/articles?userId=${_id}&num=10&status=2&sort=lastPublishAt`,
|
||||||
headers: {
|
headers: {
|
||||||
Referer: link,
|
Referer: link,
|
||||||
},
|
},
|
||||||
})).data;
|
})
|
||||||
|
).data;
|
||||||
|
|
||||||
const items = await ProcessFeed(articles, link, ctx.cache);
|
const items = await ProcessFeed(articles, link, ctx.cache);
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
const got = require('@/utils/got');
|
const got = require('@/utils/got');
|
||||||
|
|
||||||
module.exports = async (ctx) => {
|
module.exports = async (ctx) => {
|
||||||
const data = (await got({
|
const data = (
|
||||||
|
await got({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url:
|
url:
|
||||||
'https://pay.weixin.qq.com/index.php/public/cms/get_contents?id=6200&cmstype=1&url=https%253A%252F%252Fpay.weixin.qq.com%252Fpublic%252Fcms%252Fcontent_list%253Flang%253Dzh%2526id%253D6200&states=2&publishtimeend=1565537507&expiretimebeg=1565537507&propertyinclude=1&ordertype=4&field=contentId%2CcontentTitle%2CcontentPublishTime&g_ty=ajax',
|
'https://pay.weixin.qq.com/index.php/public/cms/get_contents?id=6200&cmstype=1&url=https%253A%252F%252Fpay.weixin.qq.com%252Fpublic%252Fcms%252Fcontent_list%253Flang%253Dzh%2526id%253D6200&states=2&publishtimeend=1565537507&expiretimebeg=1565537507&propertyinclude=1&ordertype=4&field=contentId%2CcontentTitle%2CcontentPublishTime&g_ty=ajax',
|
||||||
})).data.data.contentlist;
|
})
|
||||||
|
).data.data.contentlist;
|
||||||
|
|
||||||
const data2 = (await got({
|
const data2 = (
|
||||||
|
await got({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url:
|
url:
|
||||||
'https://pay.weixin.qq.com/index.php/public/cms/get_contents?pagenum=1&id=6200&cmstype=1&url=https%253A%252F%252Fpay.weixin.qq.com%252Fpublic%252Fcms%252Fcontent_list%253Flang%253Dzh%2526id%253D6200&states=2&publishtimeend=1565537507&expiretimebeg=1565537507&propertyexclude=1&ordertype=4&field=contentId%2CcontentTitle%2CcontentPublishTime&g_ty=ajax',
|
'https://pay.weixin.qq.com/index.php/public/cms/get_contents?pagenum=1&id=6200&cmstype=1&url=https%253A%252F%252Fpay.weixin.qq.com%252Fpublic%252Fcms%252Fcontent_list%253Flang%253Dzh%2526id%253D6200&states=2&publishtimeend=1565537507&expiretimebeg=1565537507&propertyexclude=1&ordertype=4&field=contentId%2CcontentTitle%2CcontentPublishTime&g_ty=ajax',
|
||||||
})).data.data.contentlist;
|
})
|
||||||
|
).data.data.contentlist;
|
||||||
|
|
||||||
data.push(...data2);
|
data.push(...data2);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user