del: remove Suncreature route (#5341)
This commit is contained in:
parent
f66e505e03
commit
2e087f3e5a
|
|
@ -83,12 +83,6 @@ Behance 用户主页 URL 获取用户名,如 <https://www.behance.net/mishapet
|
|||
|
||||
<Route author="nczitzk" example="/monotype/article" path="/monotype/article" />
|
||||
|
||||
## Sun Creature
|
||||
|
||||
### Works
|
||||
|
||||
<Route author="MisteryMonster" example="/sun-creature" path="/sun-creature" />
|
||||
|
||||
## UI 中国
|
||||
|
||||
### 推荐文章
|
||||
|
|
|
|||
|
|
@ -77,12 +77,6 @@ Default is under 'https://www.methodstudios.com/en/features'.
|
|||
|
||||
</RouteEn>
|
||||
|
||||
## Sun Creature
|
||||
|
||||
### Works
|
||||
|
||||
<RouteEn author="MisteryMonster" example="/sun-creature" path="/sun-creature" />
|
||||
|
||||
## Unit Image
|
||||
|
||||
### Films
|
||||
|
|
|
|||
|
|
@ -2691,9 +2691,6 @@ router.get('/scoresaber/user/:id', require('./routes/scoresaber/user'));
|
|||
// blur-studio
|
||||
router.get('/blur-studio', require('./routes/blur-studio/index'));
|
||||
|
||||
// Sun-Creature
|
||||
router.get('/sun-creature', require('./routes/sun-creature/index'));
|
||||
|
||||
// method-studios
|
||||
router.get('/method-studios/:menu?', require('./routes/method-studios/index'));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const url = `https://suncreature.com`;
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: url,
|
||||
});
|
||||
|
||||
const data = response.data;
|
||||
const $ = cheerio.load(data); // 使用 cheerio 加载返回的 HTML
|
||||
const list = $('li.t');
|
||||
|
||||
ctx.state.data = {
|
||||
title: 'Sun Creature',
|
||||
link: url,
|
||||
item: list
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
const title = `${item.find('h2').first().text()}`;
|
||||
const itemWebmUrl = `https://suncreature.com/videos/${item.find(':nth-child(1)').attr('data-loop')}.webm`;
|
||||
const itemWebmShow = `<video controls="controls" width="100%" src="${itemWebmUrl}"></video><br>`;
|
||||
|
||||
const vimeoID = `${item.find('button').attr('data-vimeo')}`;
|
||||
const isvimeo = vimeoID > 0;
|
||||
|
||||
const ItemURL = `${item.find('a').attr('href')}`;
|
||||
const Link = `<a href="${ItemURL}">${ItemURL}</a>`;
|
||||
|
||||
const description = isvimeo ? `<iframe width="640" height="360" src='https://player.vimeo.com/video/${vimeoID}' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe><br>` : `${Link}`;
|
||||
|
||||
return {
|
||||
title: title,
|
||||
description: `${itemWebmShow}` + description,
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
Loading…
Reference in New Issue