Skip to content

Commit 734115d

Browse files
committed
add real_xxx
一个纯粹的X站, 名字有点意思
1 parent 2c32a2b commit 734115d

File tree

1 file changed

+147
-0
lines changed

1 file changed

+147
-0
lines changed

x18/real_xxx.ts

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
// import { kitty, req, createTestEnv } from "utils"
2+
3+
export default class RealXXX implements Handle {
4+
getConfig() {
5+
return <Iconfig>{
6+
id: "real_xxxx",
7+
name: "一个纯粹的x站",
8+
type: 1,
9+
nsfw: true,
10+
api: "https://rtk.ygccdxz9.ink",
11+
extra: {
12+
gfw: false,
13+
searchLimit: 48,
14+
}
15+
}
16+
}
17+
async getCategory() {
18+
return [
19+
{
20+
"id": "20",
21+
"text": "亚洲情色"
22+
},
23+
{
24+
"id": "21",
25+
"text": "制服师生"
26+
},
27+
{
28+
"id": "22",
29+
"text": "卡通动漫"
30+
},
31+
{
32+
"id": "23",
33+
"text": "丝袜美腿"
34+
},
35+
{
36+
"id": "24",
37+
"text": "强奸乱伦"
38+
},
39+
{
40+
"id": "25",
41+
"text": "偷拍自拍"
42+
},
43+
{
44+
"id": "29",
45+
"text": "人妻熟女"
46+
},
47+
{
48+
"id": "30",
49+
"text": "无码专区"
50+
},
51+
{
52+
"id": "32",
53+
"text": "自淫系列"
54+
},
55+
{
56+
"id": "36",
57+
"text": "国产精品"
58+
},
59+
{
60+
"id": "33",
61+
"text": "拳交系列"
62+
},
63+
{
64+
"id": "28",
65+
"text": "欧美性爱"
66+
},
67+
{
68+
"id": "31",
69+
"text": "SM捆绑"
70+
},
71+
{
72+
"id": "35",
73+
"text": "男同女同"
74+
},
75+
{
76+
"id": "26",
77+
"text": "4K岛国"
78+
},
79+
{
80+
"id": "27",
81+
"text": "中文字幕"
82+
},
83+
{
84+
"id": "37",
85+
"text": "三级伦理"
86+
}
87+
]
88+
}
89+
async getHome() {
90+
const cate = env.get("category")
91+
const page = env.get("page")
92+
const url = `${env.baseUrl}/cn/home/web/index.php/vod/type/id/${cate}/page/${page}.html`
93+
const $ = kitty.load(await req(url))
94+
return $(".detail_right_div ul li").toArray().map<IMovie>(item => {
95+
const img = $(item).find("img")
96+
const title = img.attr("title") ?? ""
97+
const cover = img.attr("src") ?? ""
98+
const id = $(item).find('a').attr("href") ?? ""
99+
const remark = $(item).find("i").text() ?? ""
100+
return { title, cover, id, remark }
101+
})
102+
}
103+
async getDetail() {
104+
const id = env.get("movieId")
105+
const url = `${env.baseUrl}${id}`
106+
const html = await req(url)
107+
const m3u8 = kitty.utils.getM3u8WithStr(html)
108+
return <IMovie>{
109+
playlist: [{
110+
title: "默认",
111+
videos: [
112+
{ text: "播放", url: m3u8, }
113+
]
114+
}]
115+
}
116+
}
117+
async getSearch() {
118+
const wd = env.get("keyword")
119+
const page = env.get("page")
120+
const url = `${env.baseUrl}/cn/home/web/index.php/vod/search/page/${page}/wd/${wd}.html`
121+
const $ = kitty.load(await req(url))
122+
return $(".detail_right_div ul li").toArray().map<IMovie>(item => {
123+
const img = $(item).find("img")
124+
const title = img.attr("title") ?? ""
125+
const cover = img.attr("src") ?? ""
126+
const id = $(item).find('a').attr("href") ?? ""
127+
const remark = $(item).find("i").text() ?? ""
128+
return { title, cover, id, remark }
129+
})
130+
}
131+
}
132+
133+
// TEST
134+
// const env = createTestEnv("https://rtk.ygccdxz9.ink")
135+
// const call = new RealXXX();
136+
// (async ()=> {
137+
// const cates = await call.getCategory()
138+
// env.set("category", cates[0].id)
139+
// env.set("page", 1)
140+
// const home = await call.getHome()
141+
// env.set("keyword", "黑丝")
142+
// env.set("page", 1)
143+
// const search = await call.getSearch()
144+
// env.set("movieId", search[0].id)
145+
// const detail = await call.getDetail()
146+
// debugger
147+
// })()

0 commit comments

Comments
 (0)