fix(route): 7mmtv (#11918)
This commit is contained in:
@@ -14,7 +14,7 @@ Full transcript support for better user experience.
|
||||
|
||||
### Category
|
||||
|
||||
<RouteEn author="nczitzk" example="/7mmtv/zh/censored_list/all" path="/7mmtv/:language?/:category?/:type?" :paramsDesc="['Language, see below, `en` as English by default', 'Category, see below, `censored_list` as Censored by default', 'Server, see below, all server by default']">
|
||||
<RouteEn author="nczitzk" example="/7mmtv/zh/censored_list/all" path="/7mmtv/:language?/:category?/:type?" :paramsDesc="['Language, see below, `en` as English by default', 'Category, see below, `censored_list` as Censored by default', 'Server, see below, all server by default']" anticrawler="1">
|
||||
|
||||
**Language**
|
||||
|
||||
@@ -42,7 +42,7 @@ Full transcript support for better user experience.
|
||||
|
||||
### Maker
|
||||
|
||||
<RouteEn author="nczitzk" example="/7mmtv/zh/amateurjav_makersr/1752" path="/7mmtv/:language?/:category?/:id?" :paramsDesc="['Language, see below, `en` as English by default', 'Category, see below', 'Id, see below']">
|
||||
<RouteEn author="nczitzk" example="/7mmtv/zh/amateurjav_makersr/1752" path="/7mmtv/:language?/:category?/:id?" :paramsDesc="['Language, see below, `en` as English by default', 'Category, see below', 'Id, see below']" anticrawler="1">
|
||||
|
||||
**Language**
|
||||
|
||||
|
||||
+2
-2
@@ -154,7 +154,7 @@ pageClass: routes
|
||||
|
||||
### 分类
|
||||
|
||||
<Route author="nczitzk" example="/7mmtv/zh/censored_list/all" path="/7mmtv/:language?/:category?/:type?" :paramsDesc="['语言,见下表,默认为 `en` 即英语', '分类,见下表,默认为 `censored_list` 即 有碼AV', '空间,见下表,默认为全部']">
|
||||
<Route author="nczitzk" example="/7mmtv/zh/censored_list/all" path="/7mmtv/:language?/:category?/:type?" :paramsDesc="['语言,见下表,默认为 `en` 即英语', '分类,见下表,默认为 `censored_list` 即 有碼AV', '空间,见下表,默认为全部']" anticrawler="1">
|
||||
|
||||
**语言**
|
||||
|
||||
@@ -182,7 +182,7 @@ pageClass: routes
|
||||
|
||||
### 制作商
|
||||
|
||||
<Route author="nczitzk" example="/7mmtv/zh/amateurjav_makersr/1752" path="/7mmtv/:language?/:category?/:id?" :paramsDesc="['语言,见下表,默认为 `en` 即英语', '分类,见下表', '编号,见下表']">
|
||||
<Route author="nczitzk" example="/7mmtv/zh/amateurjav_makersr/1752" path="/7mmtv/:language?/:category?/:id?" :paramsDesc="['语言,见下表,默认为 `en` 即英语', '分类,见下表', '编号,见下表']" anticrawler="1">
|
||||
|
||||
**语言**
|
||||
|
||||
|
||||
+15
-23
@@ -9,7 +9,7 @@ module.exports = async (ctx) => {
|
||||
const category = ctx.params.category ?? 'censored_list';
|
||||
const type = ctx.params.type ?? 'all';
|
||||
|
||||
const rootUrl = 'https://7mmtv.tv';
|
||||
const rootUrl = 'https://7mmtv.sx';
|
||||
const currentUrl = `${rootUrl}/${language}/${category}/${type}/1.html`;
|
||||
|
||||
const response = await got({
|
||||
@@ -19,22 +19,19 @@ module.exports = async (ctx) => {
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
$('.pull-left p a').remove();
|
||||
|
||||
let items = $('.latest-korean-box-text a')
|
||||
let items = $('.video')
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
|
||||
const video = item.parent().parent().find('video');
|
||||
|
||||
const title = item.find('.video-title a');
|
||||
return {
|
||||
title: item.text(),
|
||||
author: item.parent().find('.pull-left').text(),
|
||||
pubDate: parseDate(item.parent().find('.date-part').text()),
|
||||
link: `${item.attr('href').match(/^(http.*_content\/\d+)/)[1]}/index.html`,
|
||||
poster: video.attr('poster'),
|
||||
video: video.attr('srcmv'),
|
||||
title: title.text(),
|
||||
author: item.find('.video-channel').text(),
|
||||
pubDate: parseDate(item.find('.small').text()),
|
||||
link: title.attr('href'),
|
||||
poster: item.find('img').attr('data-src'),
|
||||
video: item.find('video').attr('data-src'),
|
||||
};
|
||||
});
|
||||
|
||||
@@ -49,23 +46,18 @@ module.exports = async (ctx) => {
|
||||
const content = cheerio.load(detailResponse.data);
|
||||
|
||||
item.description = art(path.join(__dirname, 'templates/description.art'), {
|
||||
cover: content('.post-inner-details-img img').attr('src'),
|
||||
images: content('.video-introduction-images-list-row')
|
||||
.find('img')
|
||||
cover: content('.content_main_cover img').attr('src'),
|
||||
images: content('.owl-lazy')
|
||||
.toArray()
|
||||
.map((i) => content(i).attr('src')),
|
||||
.map((i) => content(i).attr('data-src')),
|
||||
description: content('.video-introduction-images-text').html(),
|
||||
poster: item.poster,
|
||||
video: item.video,
|
||||
});
|
||||
|
||||
item.category = content('.actor-right-images-part p')
|
||||
item.category = content('.categories a')
|
||||
.toArray()
|
||||
.map((a) => content(a).text())
|
||||
.concat(
|
||||
content('.posts-inner-details-text-under ul .posts-message span')
|
||||
.toArray()
|
||||
.map((c) => content(c).text())
|
||||
);
|
||||
.map((a) => content(a).text());
|
||||
|
||||
delete item.poster;
|
||||
delete item.video;
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
{{ if cover }}
|
||||
<img src="{{ cover }}">
|
||||
{{ /if }}
|
||||
|
||||
{{ if video }}
|
||||
<br>
|
||||
<video mute loop="loop" autoplay="autoplay" poster="{{ poster }}"><source src="{{ video }}"></video>
|
||||
<br>
|
||||
{{ /if }}
|
||||
|
||||
{{ if description }}{{@ description }}{{ /if }}
|
||||
|
||||
{{ each images }}
|
||||
<img src="{{ $value }}">
|
||||
{{ /each }}
|
||||
{{ /each }}
|
||||
|
||||
Reference in New Issue
Block a user