del: awesome pigtalls

Close #5495.
Related to #5598.
This commit is contained in:
Henry
2020-09-08 12:43:59 +01:00
parent 269e178a0b
commit c07294912f
4 changed files with 23 additions and 71 deletions
+23 -29
View File
@@ -10,38 +10,32 @@ pageClass: routes
<RouteEn author="nczitzk" example="/1x/latest/all" path="/1x/:type?/:caty?" :paramsDesc="['sort type, `latest` by default, or `popular` or `curators-choice`', 'picture category, `all` by default, see below']">
| Picture Category | Code |
| -------------- | ------------- |
| All categories | all |
| Abstract | abstract |
| Action | action |
| Animals | animals |
| Architecture | architecture |
| Conceptual | conceptual |
| Creative edit | creative-edit |
| Documentary | documentary |
| Everyday | everyday |
| Fine Art Nude | fine-art-nude |
| Humour | humour |
| Landscape | landscape |
| Macro | macro |
| Mood | mood |
| Night | night |
| Performance | performance |
| Portrait | portrait |
| Still life | still-life |
| Street | street |
| Underwater | underwater |
| Wildlife | wildlife |
| Picture Category | Code |
| ---------------- | ------------- |
| All categories | all |
| Abstract | abstract |
| Action | action |
| Animals | animals |
| Architecture | architecture |
| Conceptual | conceptual |
| Creative edit | creative-edit |
| Documentary | documentary |
| Everyday | everyday |
| Fine Art Nude | fine-art-nude |
| Humour | humour |
| Landscape | landscape |
| Macro | macro |
| Mood | mood |
| Night | night |
| Performance | performance |
| Portrait | portrait |
| Still life | still-life |
| Street | street |
| Underwater | underwater |
| Wildlife | wildlife |
</RouteEn>
## Awesome Pigtails
### New
<RouteEn author="Chingyat" example="/pigtails" path="/pigtails/index"/>
## Bing Wallpaper
### Daily Wallpaper
-6
View File
@@ -36,12 +36,6 @@ pageClass: routes
</Route>
## Awesome Pigtails
### 最新图片
<Route author="Chingyat" example="/pigtails" path="/pigtails/index"/>
## Bing 壁纸
### 每日壁纸
-3
View File
@@ -518,9 +518,6 @@ router.get('/google/doodles/:language?', require('./routes/google/doodles'));
router.get('/google/album/:id', require('./routes/google/album'));
router.get('/google/sites/:id', require('./routes/google/sites'));
// Awesome Pigtals
router.get('/pigtails', require('./routes/pigtails'));
// 每日环球展览 iMuseum
router.get('/imuseum/:city/:type?', require('./routes/imuseum'));
-33
View File
@@ -1,33 +0,0 @@
const cheerio = require('cheerio');
const got = require('@/utils/got');
const base_url = 'https://pigtails.moe';
module.exports = async (ctx) => {
const response = await got({
method: 'get',
url: base_url,
headers: {
Referer: base_url,
},
});
const $ = cheerio.load(response.data);
const items = [];
$('.posts > .post > a').each((idx, item) => {
const $item = $(item);
const img_url = $('.thumb', item).attr('style').split(')')[0].split('(')[1];
items.push({
title: $item.text(),
description: `<img src="${img_url}" >`,
link: `${base_url}${$item.attr('href')}`,
});
});
ctx.state.data = {
title: 'Awesome Pigtails',
description: 'Share awesome pigtails.',
link: base_url,
item: items,
};
};