mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 14:40:23 +08:00
feat: add pornhub model/pornstar (#5629)
This commit is contained in:
@@ -76,6 +76,22 @@ Official RSS: https://eztv.io/ezrss.xml
|
||||
|
||||
<RouteEn author="nczitzk" example="/pornhub/search/stepsister" path="/pornhub/search/:keyword" :paramsDesc="['keyword']"/>
|
||||
|
||||
### Verified amateur / Model
|
||||
|
||||
<RouteEn author="I2IMk" example="/pornhub/model/stacy-starando" path="/pornhub/model/:username/:sort?" :paramsDesc="['username, part of the url e.g. `pornhub.com/model/stacy-starando`', 'sorting method, see below']" />
|
||||
|
||||
### Verified model / Pornstar
|
||||
|
||||
<RouteEn author="I2IMk" example="/pornhub/pornstar/june-liu" path="/pornhub/pornstar/:username/:sort?" :paramsDesc="['username, part of the url e.g. `pornhub.com/pornstar/june-liu`', 'sorting method, see below']" />
|
||||
|
||||
**`sort`**
|
||||
|
||||
| mr | mv | tr | lg | cm |
|
||||
| ----------- | ----------- | --------- | ------- | ------ |
|
||||
| Most Recent | Most Viewed | Top Rated | Longest | Newest |
|
||||
|
||||
|
||||
|
||||
### Video List
|
||||
|
||||
<RouteEn author="I2IMk" example="/pornhub/category_url/video%3Fc%3D15%26o%3Dmv%26t%3Dw%26cc%3Djp" path="/pornhub/category_url/:url?" :paramsDesc="['relative path after `pornhub.com/`, need to be URL encoded']"/>
|
||||
|
||||
@@ -279,6 +279,20 @@ pageClass: routes
|
||||
|
||||
<Route author="nczitzk" example="/pornhub/search/stepsister" path="/pornhub/search/:keyword" :paramsDesc="['关键字']"/>
|
||||
|
||||
### 素人(Verified amateur /model)
|
||||
|
||||
<Route author="I2IMk" example="/pornhub/model/stacy-starando" path="/pornhub/model/:username/:sort?" :paramsDesc="['用户名, 对应其专页地址的后面部分, 如 `pornhub.com/model/stacy-starando`', '排序方式, 下文会提到']" />
|
||||
|
||||
### 色情明星(Verified model /pornstar)
|
||||
|
||||
<Route author="I2IMk" example="/pornhub/pornstar/june-liu" path="/pornhub/pornstar/:username/:sort?" :paramsDesc="['用户名, 对应其专页地址的后面部分, 如 `pornhub.com/pornstar/june-liu`', '排序方式, 下文会提到']" />
|
||||
|
||||
**排序方式 `sort`**
|
||||
|
||||
| mr | mv | tr | lg | cm |
|
||||
| -------------------- | ---------------------- | ------------------ | ------------ | ----------- |
|
||||
| Most Recent 最新精选 | Most Viewed 最多次观看 | Top Rated 评价最好 | Longest 最长 | Newest 最新 |
|
||||
|
||||
### 视频列表
|
||||
|
||||
<Route author="I2IMk" example="/pornhub/category_url/video%3Fc%3D15%26o%3Dmv%26t%3Dw%26cc%3Djp" path="/pornhub/category_url/:url?" :paramsDesc="['相对路径, `pornhub.com/` 后的部分, 需手动 URL 编码']"/>
|
||||
|
||||
@@ -306,6 +306,8 @@ router.get('/konachan.net/post/popular_recent/:period', require('./routes/konach
|
||||
router.get('/pornhub/category/:caty', require('./routes/pornhub/category'));
|
||||
router.get('/pornhub/search/:keyword', require('./routes/pornhub/search'));
|
||||
router.get('/pornhub/category_url/:url?', require('./routes/pornhub/category_url'));
|
||||
router.get('/pornhub/model/:username/:sort?', require('./routes/pornhub/model'));
|
||||
router.get('/pornhub/pornstar/:username/:sort?', require('./routes/pornhub/pornstar'));
|
||||
|
||||
// yande.re
|
||||
router.get('/yande.re/post/popular_recent', require('./routes/yande.re/post_popular_recent'));
|
||||
|
||||
@@ -21,7 +21,7 @@ module.exports = async (ctx) => {
|
||||
return {
|
||||
title: e.find('span.title a').text(),
|
||||
link: `https://www.pornhub.com` + e.find('span.title a').attr('href'),
|
||||
description: `<img src=${e.find('img').attr('src')}>`,
|
||||
description: `<img src=${e.find('img').attr('data-thumb_url')}>`,
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
|
||||
30
lib/routes/pornhub/model.js
Normal file
30
lib/routes/pornhub/model.js
Normal file
@@ -0,0 +1,30 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const username = ctx.params.username;
|
||||
const sort = ctx.params.sort ? ctx.params.sort : 'mr';
|
||||
const link = `https://www.pornhub.com/model/${username}/videos?o=${sort}`;
|
||||
|
||||
const response = await got.get(link);
|
||||
const $ = cheerio.load(response.data);
|
||||
const list = $('#mostRecentVideosSection .videoBox');
|
||||
|
||||
ctx.state.data = {
|
||||
title: $('title').first().text(),
|
||||
link: link,
|
||||
item:
|
||||
list &&
|
||||
list
|
||||
.map((_, e) => {
|
||||
e = $(e);
|
||||
|
||||
return {
|
||||
title: e.find('span.title a').text(),
|
||||
link: `https://www.pornhub.com` + e.find('span.title a').attr('href'),
|
||||
description: `<img src="${e.find('img').attr('data-thumb_url')}">`,
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
30
lib/routes/pornhub/pornstar.js
Normal file
30
lib/routes/pornhub/pornstar.js
Normal file
@@ -0,0 +1,30 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const username = ctx.params.username;
|
||||
const sort = ctx.params.sort ? ctx.params.sort : 'mr';
|
||||
const link = `https://www.pornhub.com/pornstar/${username}/videos?o=${sort}`;
|
||||
|
||||
const response = await got.get(link);
|
||||
const $ = cheerio.load(response.data);
|
||||
const list = $('#mostRecentVideosSection .videoBox');
|
||||
|
||||
ctx.state.data = {
|
||||
title: $('title').first().text(),
|
||||
link: link,
|
||||
item:
|
||||
list &&
|
||||
list
|
||||
.map((_, e) => {
|
||||
e = $(e);
|
||||
|
||||
return {
|
||||
title: e.find('span.title a').text(),
|
||||
link: `https://www.pornhub.com` + e.find('span.title a').attr('href'),
|
||||
description: `<img src="${e.find('img').attr('data-thumb_url')}">`,
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user