From c07294912f38f44e8a142f722b6ea191da8b9e1c Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 8 Sep 2020 12:43:59 +0100 Subject: [PATCH] del: awesome pigtalls Close #5495. Related to #5598. --- docs/en/picture.md | 52 ++++++++++++++++-------------------- docs/picture.md | 6 ----- lib/router.js | 3 --- lib/routes/pigtails/index.js | 33 ----------------------- 4 files changed, 23 insertions(+), 71 deletions(-) delete mode 100644 lib/routes/pigtails/index.js diff --git a/docs/en/picture.md b/docs/en/picture.md index bca8033c0..a98d522f6 100644 --- a/docs/en/picture.md +++ b/docs/en/picture.md @@ -10,38 +10,32 @@ pageClass: routes -| 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 | -## Awesome Pigtails - -### New - - - ## Bing Wallpaper ### Daily Wallpaper diff --git a/docs/picture.md b/docs/picture.md index b0bf36851..0352fd8ed 100644 --- a/docs/picture.md +++ b/docs/picture.md @@ -36,12 +36,6 @@ pageClass: routes -## Awesome Pigtails - -### 最新图片 - - - ## Bing 壁纸 ### 每日壁纸 diff --git a/lib/router.js b/lib/router.js index 0e96e4c2d..cd9a06d2e 100644 --- a/lib/router.js +++ b/lib/router.js @@ -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')); diff --git a/lib/routes/pigtails/index.js b/lib/routes/pigtails/index.js deleted file mode 100644 index 416af3e3e..000000000 --- a/lib/routes/pigtails/index.js +++ /dev/null @@ -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: ``, - link: `${base_url}${$item.attr('href')}`, - }); - }); - - ctx.state.data = { - title: 'Awesome Pigtails', - description: 'Share awesome pigtails.', - link: base_url, - item: items, - }; -};