Update Up

This commit is contained in:
cluntop
2026-04-17 10:00:33 +08:00
parent fe9346c95c
commit a2ee157592
10 changed files with 2618 additions and 1225 deletions
+256
View File
@@ -0,0 +1,256 @@
// ==UserScript==
// @name 123av
// @namespace gmspider
// @version 2024.12.03
// @description 123av GMSpider
// @author Luomo
// @match https://*.123av.com/*
// @match https://123av.com/*
// @require https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.slim.min.js
// @grant unsafeWindow
// ==/UserScript==
console.log(JSON.stringify(GM_info));
(function () {
const GMSpiderArgs = {};
if (typeof GmSpiderInject !== 'undefined') {
let args = JSON.parse(GmSpiderInject.GetSpiderArgs());
GMSpiderArgs.fName = args.shift();
GMSpiderArgs.fArgs = args;
} else {
GMSpiderArgs.fName = "homeContent";
GMSpiderArgs.fArgs = ["tags"];
}
Object.freeze(GMSpiderArgs);
const GmSpider = (function () {
const filter = {
key: "filter",
name: "过滤",
value: [{
n: "全部",
v: ""
}, {
n: "单个女演员",
v: "&filter=single_actress"
}]
};
const filterWithoutSort = [
filter
];
const defaultFilter = [
filter,
{
key: "sort",
name: "排序方式",
value: [
{
n: "最近更新",
v: "&sort=recent_update"
},
{
n: "发布时间",
v: "&sort=release_date"
},
{
n: "动态",
v: "&sort=trending"
},
{
n: "今日最好",
v: "&sort=most_viewed_today"
},
{
n: "本周最好",
v: "&sort=most_viewed_week"
},
{
n: "本月最好",
v: "&sort=most_viewed_month"
},
{
n: "观看次数最多",
v: "&sort=most_viewed"
},
{
n: "最喜欢",
v: "&sort=most_favourited"
}
]
}];
function pageList(select) {
let itemList = [];
$(select).each(function (i) {
if ($(this).find("a").attr("href") != "javascript:void(0);") {
itemList.push({
vod_id: $(this).find("a").attr("href").split("/zh/").at(-1),
vod_name: $(this).find(".detail a").text(),
vod_pic: $(this).find("img").data("src"),
vod_year: $(this).find(".duration").text()
})
}
});
return itemList;
}
function formatDetail(detail, ...keys) {
let format = "";
for (let key of keys) {
format += key in detail ? (Array.isArray(detail[key]) ? detail[key].join(" ") : detail[key]) : "";
}
return format;
}
return {
homeContent: function () {
let result = {
class: [
{type_id: "recent-update", type_name: "最近更新"},
{type_id: "trending", type_name: "热门"},
{type_id: "new-release", type_name: "全新上市"},
{type_id: "censored", type_name: "有码"},
{type_id: "uncensored", type_name: "无码"},
{type_id: "tags", type_name: "厂牌"},
{type_id: "genres", type_name: "类型"}
],
filters: {
"recent-update": filterWithoutSort,
"trending": defaultFilter,
"new-release": filterWithoutSort,
"censored": defaultFilter,
"uncensored": defaultFilter,
"tags": defaultFilter,
"genres": defaultFilter
},
list: []
};
result.class.map(item => {
$("#nav a").each(function () {
if ($(this).attr("href").endsWith(item.type_id)) {
item.type_id = $(this).attr("href")
return false
}
});
})
let itemList = pageList(".box-item-list .box-item:not(.splide__slide)");
result.list = itemList.filter((item, index) => {
return itemList.findIndex(i => i.vod_id === item.vod_id) === index
});
return result;
},
categoryContent: function (tid, pg, filter, extend) {
console.log(tid, pg, filter, JSON.stringify(extend));
let result = {
list: [],
page: pg,
pagecount: 0
};
if (tid === "tags") {
$("#nav ul li a").each(function () {
let tagHref = $(this).attr("href");
if (tagHref.includes("tags") && !tagHref.includes("http")) {
tagHref = tagHref.split("/");
result.list.push({
vod_id: tagHref.at(-2) + "/" + tagHref.at(-1),
vod_name: $(this).text().trim(),
vod_tag: "folder",
style: {
"type": "rect",
"ratio": 2
}
})
}
});
result.pagecount = 1;
} else if (tid === "genres") {
$("#page-list .bl-item").each(function () {
result.list.push({
vod_id: $(this).find("a").attr("href"),
vod_name: $(this).find(".name").text(),
vod_remarks: $(this).find(".text-muted").text(),
vod_tag: "folder",
style: {
"type": "rect",
"ratio": 1
}
})
});
result.pagecount = 1;
} else {
result.list = pageList("#page-list .box-item-list .box-item");
result.pagecount = Math.ceil(parseInt($("#page-list .section-title .text-muted").text().replace(",", "")) / 12);
}
return result;
},
detailContent: function (ids) {
let detail = {};
$("#details .detail-item div").each(function (item) {
const key = $(this).find("span:first").text().replace(":", "");
if ($(this).find("span:eq(1) a").length === 0) {
detail[key] = $(this).find("span:eq(1)").text().trim();
} else {
detail[key] = [];
$(this).find("span:eq(1) a").each(function () {
const id = $(this).attr("href");
const name = $(this).text();
detail[key].push(`[a=cr:{"id":"${id}","name":"${name}"}/]${name}[/a]`);
})
}
});
const vod = {
vod_id: ids[0],
vod_name: $(".favourite:first").data("code"),
vod_pic: $("#player").data("poster"),
vod_year: formatDetail(detail, "发布日期"),
vod_remarks: formatDetail(detail, "类型"),
vod_director: formatDetail(detail, "制作者", "标签"),
vod_actor: formatDetail(detail, "演员"),
vod_content: $(".justify-content-between.align-items-start h1").text().trim(),
vod_play_data: [{
from: "123AV",
media: [{
name: "720P",
type: "webview",
ext: {
replace: {
vod_id: ids[0]
}
}
}]
}]
};
return {list: [vod]};
},
playerContent: function (flag, id, vipFlags) {
return {
type: "match"
};
},
searchContent: function (key, quick, pg) {
const result = {
list: [],
page: pg,
pagecount: 0
};
result.list = pageList("#page-list .box-item-list .box-item");
result.pagecount = Math.ceil(parseInt($("#page-list .section-title .text-muted").text().replace(",", "")) / 12);
return result;
}
};
})();
$(document).ready(function () {
let result = "";
if ($("#cf-wrapper").length > 0) {
console.log("源站不可用:" + $('title').text());
GM_toastLong("源站不可用:" + $('title').text());
} else if ($("#body .btn-primary").text() === "Click here to continue") {
window.location = $("#body .btn-primary").attr("href");
} else {
result = GmSpider[GMSpiderArgs.fName](...GMSpiderArgs.fArgs);
}
console.log(JSON.stringify(result));
if (typeof GmSpiderInject !== 'undefined') {
GmSpiderInject.SetSpiderResult(JSON.stringify(result));
}
});
})();
+237
View File
@@ -0,0 +1,237 @@
// ==UserScript==
// @name Jable
// @namespace gmspider
// @version 2024.12.03
// @description Jable GMSpider
// @author Luomo
// @match https://jable.tv/*
// @require https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.slim.min.js
// @grant unsafeWindow
// ==/UserScript==
console.log(JSON.stringify(GM_info));
(function () {
const GMSpiderArgs = {};
if (typeof GmSpiderInject !== 'undefined') {
let args = JSON.parse(GmSpiderInject.GetSpiderArgs());
GMSpiderArgs.fName = args.shift();
GMSpiderArgs.fArgs = args;
} else {
GMSpiderArgs.fName = "homeContent";
GMSpiderArgs.fArgs = [true];
}
Object.freeze(GMSpiderArgs);
const GmSpider = (function () {
function listVideos(result) {
result.pagecount = parseInt($(".pagination .page-item:last").text());
$("[id^='list_videos_'] .row:first .video-img-box").each(function (i) {
const subTitle = $(this).find(".sub-title").text().split('\n');
const remarks = [
"👁️" + subTitle[1].trim(),
"❤️" + subTitle[2].trim()
];
const url = new URL($(this).find(".img-box a").attr("href"));
result.list.push({
vod_id: url.pathname.split('/').at(2).toUpperCase(),
vod_name: $(this).find(".title").text(),
vod_pic: $(this).find(".img-box img").data("src"),
vod_remarks: remarks.join(" "),
vod_year: $(this).find(".absolute-bottom-right").text().trim()
})
});
return result;
}
return {
homeContent: function (filter) {
let result = {
class: [
{type_id: "latest-updates", type_name: "最近更新"},
{type_id: "hot", type_name: "热门影片"},
{type_id: "categories/chinese-subtitle", type_name: "中文字幕"},
{type_id: "new-release", type_name: "全新上市"},
{type_id: "categories", type_name: "主题&标签"},
],
filters: {
hot: [{
key: "sort_by",
name: "时间",
value: [
{
n: "所有时间",
v: "&sort_by=video_viewed"
},
{
n: "本月热门",
v: "&sort_by=video_viewed_month"
},
{
n: "本周热门",
v: "&sort_by=video_viewed_week"
},
{
n: "今日热门",
v: "&sort_by=video_viewed_today"
}
]
}],
"categories/chinese-subtitle": [{
key: "sort_by",
name: "时间",
value: [
{
n: "近期最佳",
v: "&sort_by=post_date_and_popularity"
},
{
n: "最近更新",
v: "&sort_by=post_date"
},
{
n: "最多观看",
v: "&sort_by=video_viewed"
},
{
n: "最高收藏",
v: "&sort_by=most_favourited"
}
]
}],
categories: [{
key: "sort_by",
name: "时间",
value: [
{
n: "近期最佳",
v: "&sort_by=post_date_and_popularity"
},
{
n: "最近更新",
v: "&sort_by=post_date"
},
{
n: "最多观看",
v: "&sort_by=video_viewed"
},
{
n: "最高收藏",
v: "&sort_by=most_favourited"
}
]
}]
},
list: []
};
let itemList = [];
$(".video-img-box").has(".detail").has("img").each(function () {
const url = new URL($(this).find(".img-box a").attr("href"));
if (url.hostname === "jable.tv") {
itemList.push({
vod_id: url.pathname.split('/').at(2).toUpperCase(),
vod_name: $(this).find(".title").text(),
vod_pic: $(this).find("img").data("src"),
vod_year: $(this).find(".absolute-bottom-right").text().trim()
})
}
});
result.list = itemList.filter((item, index) => {
return itemList.findIndex(i => i.vod_id === item.vod_id) === index
});
return result;
},
categoryContent: function (tid, pg, filter, extend) {
let result = {
list: [],
pagecount: 1
};
if (tid === "categories") {
$("#list_categories_video_categories_list .video-img-box").each(function () {
const url = new URL($(this).find("a").attr("href")).pathname.split('/');
result.list.push({
vod_id: url[1] + "/" + url[2],
vod_name: $(this).find("h4").text(),
vod_pic: $(this).find("img").attr("src"),
vod_remarks: $(this).find(".absolute-center span").text(),
vod_tag: "folder",
style: {
"type": "rect",
"ratio": 1
}
})
});
const tags = [];
$(".app-nav .title-box:gt(0)").each(function () {
const remark = $(this).text();
$(this).next(".row").find(".tag").each(function () {
const url = new URL($(this).attr("href")).pathname.split('/');
result.list.push({
vod_id: url[1] + "/" + url[2],
vod_name: $(this).text(),
vod_remarks: remark,
vod_tag: "folder",
})
});
});
result.pagecount = 1;
} else {
listVideos(result);
}
return result;
},
detailContent: function (ids) {
let vodActor = [], categories = [], tags = [];
$(".video-info .info-header .models .model").each(function () {
const url = new URL($(this).attr("href")).pathname.split('/');
const id = url[1] + "/" + url[2];
const name = $(this).find(".rounded-circle").data("original-title");
vodActor.push(`[a=cr:{"id":"${id}","name":"${name}"}/]${name}[/a]`);
});
$(".video-info .tags .cat").each(function () {
const url = new URL($(this).attr("href")).pathname.split('/');
const id = url[1] + "/" + url[2];
const name = $(this).text();
categories.push(`[a=cr:{"id":"${id}","name":"${name}"}/]#${name}[/a]`);
});
$(".video-info .tags a:not(.cat)").each(function () {
const url = new URL($(this).attr("href")).pathname.split('/');
const id = url[1] + "/" + url[2];
const name = $(this).text();
tags.push(`[a=cr:{"id":"${id}","name":"${name}"}/]#${name}[/a]`);
});
const vod = {
vod_id: ids[0],
vod_name: ids[0].toUpperCase(),
vod_pic: $("#player").attr("poster"),
vod_year: "更新於 " + $(".video-info .info-header .mr-3:first").text() + " " + $(".video-info .info-header .inactive-color").text(),
vod_remarks: tags.join(" "),
vod_actor: vodActor.join(" ") + " " + categories.join(" "),
vod_content: $(".video-info h4").text(),
vod_play_from: $(".video-info .info-header .header-right h6").children().remove().end().text().trim(),
vod_play_url: "1080P$" + unsafeWindow.hlsUrl,
};
return {list: [vod]};
},
searchContent: function (key, quick, pg) {
const result = {
list: [],
pagecount: 1
};
listVideos(result);
return result;
}
};
})();
$(document).ready(function () {
let result = "";
if ($("#cf-wrapper").length > 0) {
console.log("源站不可用:" + $('title').text());
GM_toastLong("源站不可用:" + $('title').text());
} else {
result = GmSpider[GMSpiderArgs.fName](...GMSpiderArgs.fArgs);
}
console.log(result);
if (typeof GmSpiderInject !== 'undefined') {
GmSpiderInject.SetSpiderResult(JSON.stringify(result));
}
});
})();
+1
View File
File diff suppressed because one or more lines are too long
+272
View File
@@ -0,0 +1,272 @@
// ==UserScript==
// @name MissAV
// @namespace gmspider
// @version 2024.12.03
// @description MissAV GMSpider
// @author Luomo
// @match https://missav.*/*
// @require https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.slim.min.js
// @grant unsafeWindow
// ==/UserScript==
console.log(JSON.stringify(GM_info));
(function () {
const GMSpiderArgs = {};
if (typeof GmSpiderInject !== 'undefined') {
let args = JSON.parse(GmSpiderInject.GetSpiderArgs());
GMSpiderArgs.fName = args.shift();
GMSpiderArgs.fArgs = args;
} else {
GMSpiderArgs.fName = "detailContent";
GMSpiderArgs.fArgs = [true];
}
Object.freeze(GMSpiderArgs);
const GmSpider = (function () {
const filter = {
key: "filter",
name: "过滤",
value: [{
n: "所有",
v: ""
}, {
n: "单人作品",
v: "&filters=individual"
}, {
n: "多人作品",
v: "&filters=multiple"
}, {
n: "中文字幕",
v: "&filters=chinese-subtitle"
}]
};
const filterWithoutSort = [
filter
];
const defaultFilter = [
filter,
{
key: "sort",
name: "排序方式",
value: [
{
n: "发行日期",
v: "&sort=released_at"
},
{
n: "最近更新",
v: "&sort=published_at"
},
{
n: "收藏数",
v: "&sort=saved"
},
{
n: "今日浏览数",
v: "&sort=today_views"
},
{
n: "本周浏览数",
v: "&sort=weekly_views"
},
{
n: "本月浏览数",
v: "&sort=monthly_views"
},
{
n: "总浏览数",
v: "&sort=views"
}
]
}];
function pageList(result) {
result.pagecount = parseInt($("#price-currency").text().replace(/[^0-9]/ig, ""));
result.total = result.pagecount * result.limit;
$(".gap-5 .thumbnail").each(function (i) {
result.list.push({
vod_id: $(this).find(".text-secondary").attr("alt"),
vod_name: $(this).find(".text-secondary").text().trim(),
vod_pic: $(this).find("img").data("src"),
vod_year: $(this).find(".right-1").text().trim(),
vod_remarks: $(this).find(".left-1").text().trim(),
})
});
return result;
}
function categoryList(result) {
$(".gap-4 div").each(function () {
result.list.push({
vod_id: getCategoryFromUrl($(this).find(".text-nord13").attr("href")),
vod_name: $(this).find(".text-nord13").text().trim(),
vod_remarks: $(this).find(".text-nord10 a").text().trim(),
vod_tag: "folder",
style: {
"type": "rect",
"ratio": 2
}
})
});
result.limit = 36;
result.pagecount = parseInt($("#price-currency").text().replace(/[^0-9]/ig, ""));
result.total = result.pagecount * result.limit;
return result;
}
function getCategoryFromUrl(url) {
return url.split('/cn/').at(1);
}
function formatDetail(detail, ...keys) {
let format = "";
for (let key of keys) {
format += key in detail ? (Array.isArray(detail[key]) ? detail[key].join(" ") : detail[key]) : "";
}
return format;
}
return {
homeContent: function (filter) {
let result = {
class: [
{type_id: "new", type_name: "所有影片"},
{type_id: "madou", type_name: "麻豆传媒"},
{type_id: "chinese-subtitle", type_name: "中文字幕"},
{type_id: "uncensored-leak", type_name: "无码流出"},
{type_id: "actresses/ranking", type_name: "热门女优"},
{type_id: "makers", type_name: "发行商"},
{type_id: "genres", type_name: "类型"},
],
filters: {
"new": defaultFilter,
"madou": defaultFilter,
"chinese-subtitle": defaultFilter,
"uncensored-leak": defaultFilter,
"actresses/ranking": defaultFilter,
"makers": defaultFilter,
"genres": defaultFilter
},
list: []
};
$(".gap-5:eq(5) .thumbnail").each(function () {
result.list.push({
vod_id: $(this).find(".text-secondary").attr("alt"),
vod_name: $(this).find(".text-secondary").text().trim(),
vod_pic: $(this).find("img").data("src"),
vod_year: $(this).find(".absolute").text().trim()
})
});
console.log(result);
return result;
},
categoryContent: function (tid, pg, filter, extend) {
let result = {
list: [],
limit: 12,
total: 0,
page: pg,
pagecount: 0
};
if (tid === "actresses/ranking") {
$(".gap-4 .space-y-4").each(function () {
result.list.push({
vod_id: getCategoryFromUrl($(this).find(".space-y-2 a").attr("href")),
vod_name: $(this).find(".truncate").text().trim(),
vod_pic: $(this).find("img").length > 0 ? $(this).find("img").attr("src") : "",
vod_remarks: $(this).find(".text-sm").text().trim(),
vod_tag: "folder",
style: {
"type": "rect",
"ratio": 1
}
})
});
result.limit = 100;
result.total = 100;
result.pagecount = 1;
} else if (tid === "makers") {
function getNavs(name) {
$("nav.hidden .relative a.group span:contains('" + name + "')").parents(".relative:first").find(".py-1 a").each(function () {
result.list.push({
vod_id: getCategoryFromUrl($(this).attr("href")),
vod_name: $(this).text().trim(),
vod_remarks: name,
vod_tag: "folder",
style: {
"type": "rect",
"ratio": 2
}
})
})
}
if (pg == 1) {
getNavs("国产 AV");
getNavs("无码影片");
getNavs("素人");
}
result = categoryList(result)
} else if (tid === "genres") {
result = categoryList(result)
} else {
result = pageList(result);
}
return result;
},
detailContent: function (ids) {
let detail = {};
$(".space-y-2:not(.list-disc) .text-secondary").each(function () {
const key = $(this).find("span:first").text().replace(":", "");
if ($(this).find("a").length === 0) {
detail[key] = $(this).find("span:first").remove().end().text().trim();
} else {
detail[key] = [];
$(this).find("a").each(function () {
const id = getCategoryFromUrl($(this).attr("href"));
const name = $(this).text();
detail[key].push(`[a=cr:{"id":"${id}","name":"${name}"}/]${name}[/a]`);
})
}
});
console.log($('a.items-center:contains("显示更多")'));
const vod = {
vod_id: ids[0],
vod_name: ids[0].toUpperCase(),
vod_pic: $("head link[as=image]").attr("href"),
vod_year: $("#space-y-2 time").text(),
vod_remarks: formatDetail(detail, "类型"),
vod_actor: formatDetail(detail, "女优"),
vod_content: $('a.items-center:contains("显示更多")').length > 0 ? $("head meta[name=description]").attr("content") : $("head meta[property='og:title']").attr("content"),
vod_play_from: "MissAV",
vod_play_url: "多视轨$" + hls.url,
};
console.log({list: [vod]})
return {list: [vod]};
},
searchContent: function (key, quick, pg) {
let result = {
list: [],
limit: 12,
total: 0,
page: pg,
pagecount: 0
};
result = pageList(result);
return result;
}
};
})();
$(document).ready(function () {
let result = "";
if ($("#cf-wrapper").length > 0) {
console.log("源站不可用:" + $('title').text());
GM_toastLong("源站不可用:" + $('title').text());
} else {
result = GmSpider[GMSpiderArgs.fName](...GMSpiderArgs.fArgs);
}
console.log(result);
if (typeof GmSpiderInject !== 'undefined') {
GmSpiderInject.SetSpiderResult(JSON.stringify(result));
}
});
})();
+254
View File
@@ -0,0 +1,254 @@
// ==UserScript==
// @name NETFLAV
// @namespace gmspider
// @version 2025.10.25
// @description NETFLAV GMSpider
// @author Luomo
// @match https://netflav.com/*
// @require https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.slim.min.js
// @grant unsafeWindow
// ==/UserScript==
console.log(JSON.stringify(GM_info));
if (typeof unsafeWindow.gmSpiderRunning === "undefined") {
unsafeWindow.gmSpiderRunning = true;
(function () {
const GMSpiderArgs = {};
if (typeof GmSpiderInject !== 'undefined') {
let args = JSON.parse(GmSpiderInject.GetSpiderArgs());
GMSpiderArgs.fName = args.shift();
GMSpiderArgs.fArgs = args;
} else {
GMSpiderArgs.fName = "homeContent";
GMSpiderArgs.fArgs = [];
}
Object.freeze(GMSpiderArgs);
let _gotHookFunction = function () {
console.log("_gotHookFunction hook failed");
};
let itemCount = 0;
let gotItems = [];
Object.defineProperty(Object.prototype, 'componentDidMount', {
configurable: true,
get: function () {
let item = this?.props?.item;
if (typeof item?.videoId !== "undefined") {
gotItems.push(item);
if (gotItems.length === itemCount) {
_gotHookFunction(gotItems);
}
}
return true;
},
set: function (value) {
return true;
},
});
const GmSpider = (function () {
function getVideos(key, result) {
const formatData = JSON.parse($("#__NEXT_DATA__").html());
let vods = [];
formatData.props.initialState[key].docs?.forEach(function (media) {
vods.push({
vod_id: media.videoId,
vod_name: media.title,
vod_pic: media.preview.length > 0 ? media.preview : media.preview_hp,
vod_remarks: "👁️" + media.views,
})
});
if (typeof result == "object") {
result.list = vods;
result.pagecount = formatData.props.initialState[key].pages;
}
return vods;
}
return {
homeContent: function (filter) {
let result = {
class: [
{type_id: "trending?", type_name: "最受欢迎"},
{type_id: "browse?", type_name: "年度精选"},
{type_id: "chinese-sub?", type_name: "中文字幕"},
{type_id: "all?genre=國產AV", type_name: "国产AV"},
{type_id: "censored?", type_name: "有码影片"},
{type_id: "uncensored?", type_name: "无码影片"},
{type_id: "genre?", type_name: "类别"}],
filters: {
"trending?": [{
key: "range", name: "时间", value: [{
n: "全部", v: ""
}, {
n: "本月", v: "&range=month&value=1"
}, {
n: "上个月", v: "&range=month&value=2"
}, {
n: "2个月前", v: "&range=month&value=3"
}, {
n: "3个月前", v: "&range=month&value=4"
}, {
n: "4个月前", v: "&range=month&value=5"
}, {
n: "5个月前", v: "&range=month&value=6"
}]
}]
}, list: []
};
result.list = getVideos("trending");
return result;
}, categoryContent: function (tid, pg, filter, extend) {
console.log(tid, pg, filter, extend);
let result = {
list: [], pagecount: 1
};
if (tid === "genre?") {
$(".genre_item_container .genre_item").each(function () {
result.list.push({
vod_id: $(this).attr("href").substring(1),
vod_name: $(this).find("div").text(),
vod_tag: "folder",
style: {
"type": "rect", "ratio": 1
}
})
})
} else if (tid === "browse?") {
result.list.push(
{
vod_id: "2024?", vod_name: "2024年度精选", vod_remarks: "年度精选", vod_tag: "folder"
}, {
vod_id: "2023?", vod_name: "2023年度精选", vod_remarks: "年度精选", vod_tag: "folder"
}, {
vod_id: "2022?", vod_name: "2022年度精选", vod_remarks: "年度精选", vod_tag: "folder"
}, {
vod_id: "2021?", vod_name: "2021年度精选", vod_remarks: "年度精选", vod_tag: "folder"
}, {
vod_id: "2020?", vod_name: "2020年度精选", vod_remarks: "年度精选", vod_tag: "folder"
}, {
vod_id: "2019?", vod_name: "2019年度精选", vod_remarks: "年度精选", vod_tag: "folder"
});
const formatData = JSON.parse($("#__NEXT_DATA__").html());
formatData.props.initialState.randomShareList.docs.forEach(function (share) {
result.list.push({
vod_id: `share?c=${share.shareCode}`,
vod_name: share.shareCode,
vod_remarks: "片单",
vod_pic: share.srcs[0],
vod_tag: "folder"
})
});
} else {
const formatData = JSON.parse($("#__NEXT_DATA__").html());
const key = tid.split("?").at(0).split("-").at(0);
if ($.isNumeric(key)) {
$(".playlist_grid_full a").each(function () {
result.list.push({
vod_id: $(this).attr("href").substring(1),
vod_name: $(this).find(".playlist_head div").eq(1).text().trim(),
vod_remarks: "片单",
vod_pic: $(this).find("img").eq(1).attr("src"),
vod_tag: "folder"
})
});
console.log(gotItems.length, $(".video_grid_container .grid_0_cell").length);
if (gotItems.length === $(".video_grid_container .grid_0_cell").length) {
gotItems.forEach(function (media) {
result.list.push({
vod_id: media.videoId,
vod_name: media.title,
vod_pic: media.preview.length > 0 ? media.preview : media.preview_hp,
vod_remarks: media.duration,
})
})
} else {
return new Promise(function (resolve) {
_gotHookFunction = resolve;
itemCount = $(".video_grid_container .grid_0_cell").length;
}).then((items) => {
items.forEach(function (media) {
result.list.push({
vod_id: media.videoId,
vod_name: media.title,
vod_pic: media.preview.length > 0 ? media.preview : media.preview_hp,
vod_remarks: media.duration,
})
})
return result
});
}
} else {
getVideos(key, result);
}
}
return result;
},
detailContent: function (ids) {
const formatData = JSON.parse($("#__NEXT_DATA__").html());
const video = formatData.props.initialState.video.data;
let vodActor = [], tags = [];
video?.actors.forEach(function (actor) {
if (actor.startsWith("zh:")) {
const actress = actor.substring(3);
vodActor.push(`[a=cr:{"id":"all?actress=${actress}","name":"${actress}"}/]${actress}[/a]`);
}
})
video?.tags.forEach(function (tag) {
if (tag.startsWith("zh:")) {
const genre = tag.substring(3);
tags.push(`[a=cr:{"id":"all?genre=${genre}","name":"${genre}"}/]${genre}[/a]`);
}
})
let vodPlayData = [];
video?.srcs.forEach(function (src, index) {
vodPlayData.push({
from: `播放源${index + 1}`,
media: [{
name: video?.category ?? video.code,
type: "webview",
ext: {
replace: {
vod_id: video.videoId,
src: index + 1
}
}
}]
})
})
return {
vod_id: video.videoId,
vod_name: video.code,
vod_pic: video.preview_hp,
vod_year: (video.videoDate && typeof video.videoDate.substring === 'function') ? video.videoDate.substring(0, 10) : '',
vod_remarks: tags.join(" "),
vod_actor: vodActor.join(" "),
vod_content: video.description,
vod_play_data: vodPlayData
};
},
playerContent: function (flag, id, vipFlags) {
let link = window.location.hash.split("#").at(1);
document.querySelector(`.videoiframe_source_container .videoiframe_source_tag:nth-child(${link})`).dispatchEvent(new Event("click"));
return {
type: "match"
};
},
searchContent: function (key, quick, pg) {
const result = {
list: [], pagecount: 1
};
getVideos("search", result);
return result;
}
};
})();
$(document).ready(async function () {
let result = await GmSpider[GMSpiderArgs.fName](...GMSpiderArgs.fArgs);
console.log(result);
if (typeof GmSpiderInject !== 'undefined') {
GmSpiderInject.SetSpiderResult(JSON.stringify(result));
}
});
})();
} else {
console.log("gmSpider run again");
}
+244
View File
@@ -0,0 +1,244 @@
// ==UserScript==
// @name Supjav
// @namespace gmspider
// @version 2025.11.12
// @description Supjav GMSpider
// @author Luomo
// @match https://supjav.com/*
// @require https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.slim.min.js
// @grant GM_cookie
// @grant unsafeWindow
// ==/UserScript==
console.log(JSON.stringify(GM_info));
(function () {
const GMSpiderArgs = {};
if (typeof GmSpiderInject !== 'undefined') {
let args = JSON.parse(GmSpiderInject.GetSpiderArgs());
GMSpiderArgs.fName = args.shift();
GMSpiderArgs.fArgs = args;
} else {
GMSpiderArgs.fName = "homeContent";
GMSpiderArgs.fArgs = ["tag"];
}
Object.freeze(GMSpiderArgs);
const GmSpider = (function () {
function listVideos() {
let itemList = [];
$(".post").each(function () {
const url = new URL($(this).find(".img").attr("href"));
itemList.push({
vod_id: url.pathname.split('/').at(2),
vod_name: $(this).find(".img").attr("title"),
vod_pic: formatImgUrl($(this).find("img").data("original")),
vod_remarks: $(this).find(".date").text(),
vod_year: $(this).find(".meta").children().remove().end().text()
})
});
return itemList;
}
let cf_clearance = null;
function formatImgUrl(url) {
if (cf_clearance === null) {
GM_cookie.list({name: "cf_clearance"}, function (cookies, error) {
if (!error && cookies.length > 0) {
cf_clearance = cookies[0].value;
localStorage.setItem("cf_clearance", cf_clearance);
} else {
let cache_cf_clearance = localStorage.getItem("cf_clearance");
if (typeof cache_cf_clearance !== "undefined" && cache_cf_clearance !== null && cache_cf_clearance.length > 0) {
cf_clearance = cache_cf_clearance;
}
}
});
}
if (cf_clearance !== null) {
url = url + "@User-Agent=" + window.navigator.userAgent + "@Cookie=cf_clearance=" + cf_clearance;
}
return url;
}
return {
homeContent: function (filter) {
const defaultFilter = [{
key: "sort",
name: "排序",
value: [
{
n: "观看数",
v: "views"
},
{
n: "更新时间",
v: ""
}
]
}];
let result = {
class: [
{type_id: "popular", type_name: "热门"},
{type_id: "category/censored-jav", type_name: "有码"},
{type_id: "category/uncensored-jav", type_name: "无码"},
{type_id: "category/amateur", type_name: "素人"},
{type_id: "category/chinese-subtitles", type_name: "中文字幕"},
{type_id: "category/reducing-mosaic", type_name: "无码破解"},
{type_id: "category/english-subtitles", type_name: "英文字幕"},
{type_id: "tag", type_name: "类别"},
],
filters: {
popular: [{
key: "sort",
name: "时间",
value: [
{
n: "本月热门",
v: "month"
},
{
n: "本周热门",
v: "week"
},
{
n: "今日热门",
v: ""
}
]
}]
},
list: []
};
result.class.forEach((item) => {
if (typeof result.filters[item.type_id] === "undefined") {
result.filters[item.type_id] = defaultFilter;
}
})
result.list = listVideos()
return result;
},
categoryContent: function (tid, pg, filter, extend) {
let result = {
list: [],
pagecount: 1
};
if (tid === "tag") {
$(".categorys .child").each(function () {
const url = new URL($(this).find("a").attr("href")).pathname.split('/');
const text = $(this).text().trim().split("(")
result.list.push({
vod_id: url[2] + "/" + url[3],
vod_name: text[0],
vod_remarks: parseInt(text[1]) + " 部影片",
vod_tag: "folder",
style: {
"type": "rect",
"ratio": 1
}
})
});
result.pagecount = $(".pagination li").not(".next-page").last().text().trim();
} else {
if ($(".pagination li").length > 0) {
result.pagecount = $(".pagination li").not(".next-page").last().text().trim();
}
result.list = listVideos();
}
return result;
},
detailContent: function (ids) {
$("#vserver").click();
let vodActor = [], tags = [];
$(".post-meta .cats a").each(function () {
const id = new URL($(this).attr("href")).pathname.replace("/zh/", "");
const name = $(this).text().trim();
vodActor.unshift(`[a=cr:{"id":"${id}","name":"${name}"}/]${name}[/a]`);
});
$(".post-meta .tags a").each(function () {
const id = new URL($(this).attr("href")).pathname.replace("/zh/", "");
const name = $(this).text().trim();
tags.push(`[a=cr:{"id":"${id}","name":"${name}"}/]#${name}[/a]`);
});
let vodContent = $(".post-meta .img").attr("alt").trim();
let vodName = vodContent.replace("[无码破解]", '');
let match = vodName.match(/^[\w|-]+/g);
if (match) {
if (match[0].includes("-")) {
vodName = match[0];
} else {
match = vodContent.match(/^[\w]+\s[\w]+/g);
if (match) {
vodName = match[0].replace(" ", "-");
}
}
}
let vodPlayData = [];
let btnServers;
if ($(".video-wrap .cd-server").length > 0) {
btnServers = $(".video-wrap .cd-server:first .btn-server");
} else {
btnServers = $(".video-wrap .btn-server");
}
btnServers.each(function (i) {
vodPlayData.push({
from: $(this).text().trim(),
media: [{
name: vodName,
type: "webview",
ext: {
replace: {
pathname: ids[0],
link: i
}
}
}]
});
})
const result = {
list: [{
vod_id: ids[0],
vod_name: vodName,
vod_pic: formatImgUrl($(".post-meta .img").attr("src")),
vod_actor: vodActor.join(" "),
vod_remarks: tags.join(" "),
vod_content: vodContent,
vod_play_data: vodPlayData
}]
};
return result
},
playerContent: function (flag, id, vipFlags) {
const link = window.location.hash.split("#").at(1);
document.querySelectorAll(`.video-wrap .btn-server`)[link].dispatchEvent(new Event("click"));
return {
type: "match"
};
},
searchContent: function (key, quick, pg) {
const result = {
list: [],
pagecount: 1
};
result.list = listVideos();
if ($(".pagination li").length > 0) {
result.pagecount = $(".pagination li").not(".next-page").last().text().trim();
}
return result;
}
};
})();
$(document).ready(function () {
if ($(".loading-verifying").length > 0) {
GmSpiderInject.ShowWebview();
}
});
$(unsafeWindow).on("load", function () {
const result = GmSpider[GMSpiderArgs.fName](...GMSpiderArgs.fArgs);
console.log(result);
if (typeof GmSpiderInject !== 'undefined') {
GmSpiderInject.HideWebview();
GmSpiderInject.SetSpiderResult(JSON.stringify(result));
}
});
})();
+162
View File
@@ -0,0 +1,162 @@
// ==UserScript==
// @name XOJAV
// @namespace gmspider
// @version 2024.12.02
// @description XOJAV GMSpider
// @author Luomo
// @match https://xojav.tv/*
// @require https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.slim.min.js
// @grant unsafeWindow
// ==/UserScript==
console.log(JSON.stringify(GM_info));
(function () {
const GMSpiderArgs = {};
if (typeof GmSpiderInject !== 'undefined') {
let args = JSON.parse(GmSpiderInject.GetSpiderArgs());
GMSpiderArgs.fName = args.shift();
GMSpiderArgs.fArgs = args;
} else {
GMSpiderArgs.fName = "searchContent";
GMSpiderArgs.fArgs = [["ssni-748"]];
}
Object.freeze(GMSpiderArgs);
const GmSpider = (function () {
function listVideos(select) {
let vods = [];
$(select).each(function () {
const remarks = [
"👁️" + $(this).find(".card-video__stats .num:first").text().trim(),
"❤️" + $(this).find(".card-video__fav-button .num").text().trim()
];
const url = new URL($(this).find(".card-video__title a").attr("href"));
vods.push({
vod_id: url.pathname.split('/').at(2).toUpperCase(),
vod_name: $(this).find(".card-video__img img").attr("alt"),
vod_pic: $(this).find(".card-video__img img").data("src"),
vod_remarks: remarks.join(" "),
vod_year: $(this).find(".card-video__duration").text().trim()
})
})
return vods;
}
return {
homeContent: function (filter) {
let result = {
class: [
{type_id: "latest-updates?sort_by=release_at", type_name: "最近更新"},
{type_id: "categories/taiwan-av?sort_by=release_at", type_name: "台湾AV"},
{type_id: "stars?sort_by=stars", type_name: "近期最佳"},
{type_id: "hot?sort_by=views", type_name: "热门"},
{type_id: "categories?", type_name: "所有分类"},
],
filters: {
"categories/taiwan-av?sort_by=release_at": [{
key: "sort_by",
name: "排序",
value: [
{n: "近期最佳", v: "&sort_by=stars"},
{n: "观看数", v: "&sort_by=views"},
{n: "最近更新", v: "&sort_by=release_at"}
]
}],
"categories?": [{
key: "sort_by",
name: "排序",
value: [
{n: "近期最佳", v: "&sort_by=stars"},
{n: "观看数", v: "&sort_by=views"},
{n: "最近更新", v: "&sort_by=release_at"},
]
}]
},
list: []
};
let itemList = listVideos(".card-video");
result.list = itemList.filter((item, index) => {
return itemList.findIndex(i => i.vod_id === item.vod_id) === index
});
return result;
},
categoryContent: function (tid, pg, filter, extend) {
let result = {
list: [],
pagecount: 1
};
if (tid === "categories?") {
$(".padding-bottom-xl").each(function () {
let remarks = $(this).find(".title--listing").text().trim();
$(this).find(".card-cat-v2").each(function () {
const url = new URL($(this).find(".card-cat-v2__link").attr("href")).pathname.split('/');
result.list.push({
vod_id: url[1] + "/" + url[2] + "?sort_by=release_at",
vod_name: $(this).find(".card-cat-v2__title h4").text(),
vod_pic: $(this).find("img").attr("src"),
vod_remarks: remarks,
vod_tag: "folder",
style: {
"type": "rect",
"ratio": 0.7
}
})
});
})
result.pagecount = 1;
} else {
result.list = listVideos(".card-video");
result.pagecount = $('.pagination__list li[class] .pagination__item:last').text().trim();
}
return result;
},
detailContent: function (ids) {
let categories = [], tags = [];
$(".content-details__meta a").each(function () {
const url = new URL($(this).attr("href")).pathname.split('/');
const id = url[1] + "/" + url[2] + "?sort_by=release_at";
const name = $(this).text().trim();
if (name.length > 0) {
if (url[1] === "categories") {
categories.push(`[a=cr:{"id":"${id}","name":"${name}"}/]${name}[/a]`);
} else {
tags.push(`[a=cr:{"id":"${id}","name":"${name}"}/]${name}[/a]`);
}
}
})
const vod = {
vod_id: ids[0],
vod_name: ids[0].toUpperCase(),
vod_year: $(".content-details__meta time").text(),
vod_remarks: categories.join(" "),
vod_actor: tags.join(" "),
vod_content: $(".content-details__title").text(),
vod_play_from: "XOJAV",
vod_play_url: "720P$" + unsafeWindow.stream,
};
return {list: [vod]};
},
searchContent: function (key, quick, pg) {
const result = {
list: [],
pagecount: 1
};
result.list = listVideos(".card-video");
result.pagecount = Math.ceil($('.title--sub-title').text().replace(/[^0-9]/ig, "") / 24)
return result;
}
};
})();
$(document).ready(function () {
let result = "";
if ($("#cf-wrapper").length > 0) {
console.log("源站不可用:" + $('title').text());
GM_toastLong("源站不可用:" + $('title').text());
} else {
result = GmSpider[GMSpiderArgs.fName](...GMSpiderArgs.fArgs);
}
console.log(result);
if (typeof GmSpiderInject !== 'undefined') {
GmSpiderInject.SetSpiderResult(JSON.stringify(result));
}
});
})();