mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-19 09:52:21 +08:00
feat(route): missav (#13997)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
'/new': ['TonyRL'],
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { art } = require('@/utils/render');
|
||||
const { join } = require('path');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const baseUrl = 'https://missav.com';
|
||||
const { data: response } = await got(`${baseUrl}/dm397/new`);
|
||||
const $ = cheerio.load(response);
|
||||
|
||||
const items = $('.grid .group')
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
const title = item.find('.text-secondary');
|
||||
const poster = new URL(item.find('img').data('src'));
|
||||
poster.searchParams.set('class', 'normal');
|
||||
const video = item.find('video').data('src');
|
||||
return {
|
||||
title: title.text().trim(),
|
||||
link: title.attr('href'),
|
||||
description: art(join(__dirname, 'templates/preview.art'), {
|
||||
poster: poster.href,
|
||||
video,
|
||||
type: video.split('.').pop(),
|
||||
}),
|
||||
};
|
||||
});
|
||||
|
||||
ctx.state.data = {
|
||||
title: $('head title').text(),
|
||||
description: $('head meta[name="description"]').attr('content'),
|
||||
link: baseUrl,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
module.exports = {
|
||||
'missav.com': {
|
||||
_name: 'MissAV.com',
|
||||
'.': [
|
||||
{
|
||||
title: '最近更新',
|
||||
docs: 'https://docs.rsshub.app/multimedia#missav-com',
|
||||
source: ['/dm397/new', '/new', '/'],
|
||||
target: '/missav/new',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = (router) => {
|
||||
router.get('/new', require('./new'));
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
<video controls preload="none" poster="{{ poster }}">
|
||||
<source src="{{ video }}" type="{{ type }}">
|
||||
</video>
|
||||
@@ -985,6 +985,12 @@ See [Directory](https://www.javlibrary.com/en/star_list.php) to view all stars.
|
||||
|
||||
</Route>
|
||||
|
||||
## MissAV.com {#missav.com}
|
||||
|
||||
### 最近更新 {#missav.com-zui-jin-geng-xin}
|
||||
|
||||
<Route author="TonyRL" example="/missav/new" path="/missav/new" radar="1" />
|
||||
|
||||
## Mixcloud {#mixcloud}
|
||||
|
||||
### User {#mixcloud-user}
|
||||
|
||||
Reference in New Issue
Block a user