+23
-29
@@ -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
|
||||
|
||||
@@ -36,12 +36,6 @@ pageClass: routes
|
||||
|
||||
</Route>
|
||||
|
||||
## Awesome Pigtails
|
||||
|
||||
### 最新图片
|
||||
|
||||
<Route author="Chingyat" example="/pigtails" path="/pigtails/index"/>
|
||||
|
||||
## Bing 壁纸
|
||||
|
||||
### 每日壁纸
|
||||
|
||||
@@ -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'));
|
||||
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user