mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-07 21:47:57 +08:00
feat: add aptonic Dropzone action (#2545)
* feat: add aptonic Dropzone action * doc: aptonic Dropzone action
This commit is contained in:
@@ -651,3 +651,9 @@ Supported sub-sites:
|
|||||||
#### Poems
|
#### Poems
|
||||||
|
|
||||||
<RouteEn author="HenryQW" example="/allpoetry/newest" path="/allpoetry/:order?" :paramsDesc="['order by type, `best` or `newest`, default to `best`']"/>
|
<RouteEn author="HenryQW" example="/allpoetry/newest" path="/allpoetry/:order?" :paramsDesc="['order by type, `best` or `newest`, default to `best`']"/>
|
||||||
|
|
||||||
|
## aptonic
|
||||||
|
|
||||||
|
### New Dropzone Actions
|
||||||
|
|
||||||
|
<RouteEn author="HenryQW" example="/aptonic/action" path="/aptonic/action"/>
|
||||||
|
|||||||
@@ -32,6 +32,12 @@ pageClass: routes
|
|||||||
|
|
||||||
<Route author="HenryQW" example="/appstore/gofans" path="/appstore/gofans"/>
|
<Route author="HenryQW" example="/appstore/gofans" path="/appstore/gofans"/>
|
||||||
|
|
||||||
|
## aptonic
|
||||||
|
|
||||||
|
### 新的 Dropzone 动作
|
||||||
|
|
||||||
|
<Route author="HenryQW" example="/aptonic/action" path="/aptonic/action"/>
|
||||||
|
|
||||||
## Bugly SDK
|
## Bugly SDK
|
||||||
|
|
||||||
### 更新日志
|
### 更新日志
|
||||||
|
|||||||
@@ -1467,4 +1467,7 @@ router.get('/tprtc/news', require('./routes/tprtc/news'));
|
|||||||
// ArchDaily
|
// ArchDaily
|
||||||
router.get('/archdaily', require('./routes/archdaily/home'));
|
router.get('/archdaily', require('./routes/archdaily/home'));
|
||||||
|
|
||||||
|
// aptonic Dropzone actions
|
||||||
|
router.get('/aptonic/action', require('./routes/aptonic/action'));
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
|||||||
34
lib/routes/aptonic/action.js
Normal file
34
lib/routes/aptonic/action.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
const got = require('@/utils/got');
|
||||||
|
const url = require('url');
|
||||||
|
const cheerio = require('cheerio');
|
||||||
|
|
||||||
|
module.exports = async (ctx) => {
|
||||||
|
const link = `https://aptonic.com/actions/`;
|
||||||
|
|
||||||
|
const res = await got.get(link);
|
||||||
|
const $ = cheerio.load(res.body);
|
||||||
|
|
||||||
|
ctx.state.data = {
|
||||||
|
title: 'Dropzone Actions',
|
||||||
|
link,
|
||||||
|
item: $('table.actions >> tr')
|
||||||
|
.get()
|
||||||
|
.map((item) => {
|
||||||
|
item = $(item);
|
||||||
|
return {
|
||||||
|
title: item.find('h2').text(),
|
||||||
|
description: `
|
||||||
|
<img referrerpolicy="no-referrer" src="${url.resolve(link, item.find('img').attr('src'))}"/>
|
||||||
|
<br/>
|
||||||
|
${$(item.find('td')[1])
|
||||||
|
.children()
|
||||||
|
.remove()
|
||||||
|
.end()
|
||||||
|
.text()}
|
||||||
|
`,
|
||||||
|
pubDate: new Date().toUTCString(),
|
||||||
|
link: url.resolve(link, item.find('td.icon a').attr('href')),
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user