mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 14:40:23 +08:00
feat: 删除 Artand, 官方已有源 (#2714)
This commit is contained in:
@@ -4,12 +4,6 @@ pageClass: routes
|
||||
|
||||
# 购物
|
||||
|
||||
## Artand
|
||||
|
||||
### 用户新作
|
||||
|
||||
<Route author="junbaor" example="/artand/user/work/672" path="/artand/user/work/:uid" :paramsDesc="['用户ID, 不太好找, 自行抓包研究吧']"/>
|
||||
|
||||
## Westore
|
||||
|
||||
### 新品
|
||||
|
||||
@@ -1563,9 +1563,6 @@ router.get('/getitfree/search/:keyword?', require('./routes/getitfree/search.js'
|
||||
// 万联网
|
||||
router.get('/10000link/news/:category?', require('./routes/10000link/news'));
|
||||
|
||||
// Artand
|
||||
router.get('/artand/user/work/:uid', require('./routes/artand/user/work'));
|
||||
|
||||
// 站酷
|
||||
router.get('/zcool/recommend/:type', require('./routes/zcool/recommend'));
|
||||
router.get('/zcool/top', require('./routes/zcool/top'));
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const uid = ctx.params.uid;
|
||||
|
||||
const url = `https://ios2.artand.cn/user1/index?tab=work&uid=${uid}`;
|
||||
const response = await got({ method: 'get', url });
|
||||
const dataUser = response.data.user;
|
||||
const dataList = response.data.list;
|
||||
|
||||
const result = await Promise.all(
|
||||
dataList.map(async (item) => {
|
||||
const voItem = {
|
||||
title: item.name,
|
||||
author: dataUser.uname,
|
||||
description: '',
|
||||
pubDate: new Date(item.mtime * 1000).toUTCString(),
|
||||
link: `https://artand.cn/artid/${Number(item.id) + 100000}`, // +100000 的逻辑挺奇怪
|
||||
};
|
||||
|
||||
const link = 'https://ios2.artand.cn/works/index?post_id=' + item.id;
|
||||
|
||||
const cache = await ctx.cache.get(link);
|
||||
if (cache) {
|
||||
return Promise.resolve(JSON.parse(cache));
|
||||
}
|
||||
|
||||
const itemReponse = await got.get(link);
|
||||
voItem.description = itemReponse.data.data.work.desc;
|
||||
|
||||
ctx.cache.set(link, JSON.stringify(voItem));
|
||||
return Promise.resolve(voItem);
|
||||
})
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: `${dataUser.uname} 的 Artand 新作`,
|
||||
link: `https://artand.cn/${dataUser.uid}`,
|
||||
description: `${dataUser.uname} 的 Artand 新作`,
|
||||
item: result,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user