*/
this.tags_map = {}
for (const item of tagsAndCategories) {
this.tags_map[item.id] = {
color: '#22a2c3',
...item,
}
}
}
/**
* 获取搜索结果
* @param {TNodeSearchResult} response
*/
getResult(response) {
if (response.status === 401) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return [];
}
options.isLogged = true;
if (response.data.total === 0 || response.data.torrents.length === 0) {
options.status = ESearchResultParseStatus.noTorrents; // `[${options.site.name}]没有搜索到相关的种子`;
return [];
}
/**
* @type {SearchResultItem[]}
*/
const results = []
const host = site.url.endsWith('/') ? site.url.slice(0, -1) : site.url;
try {
for (const torrent of response.data.torrents) {
const link = host + '/torrent/info/' + torrent.id;
let url = host + '/api/torrent/download/' + torrent.id;
if (site.passkey) {
url += '/' + site.passkey;
}
const tags = (torrent.tags || []).map(x => this.tags_map[x]);
const category = torrent.category ? this.tags_map[torrent.category] : undefined;
results.push({
title: torrent.title,
subTitle: torrent.subtitle,
link,
url,
site: this.site,
size: torrent.size,
time: torrent.upload_time,
author: torrent.anonymous ? undefined: torrent.user.username,
seeders: torrent.seeding,
leechers: torrent.leeching,
completed: torrent.complete,
comments: undefined,
tags,
category,
progress: undefined,
status: undefined,
imdbId: undefined,
entryName: '全部',
});
}
} catch (error) {
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack;
//`[${options.site.name}]获取种子信息出错: ${error.stack}`;
}
return results;
}
}
let site = options.site;
let tagsAndCategories = site.user && site.user.tagsAndCategories || [];
let parser = new Parser(site, tagsAndCategories);
options.results = parser.getResult(options.page);
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/schemas/TNode/torrents.js
================================================
(function($) {
console.log("this is torrent.js");
class App extends window.TNodeCommon {
init() {
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let urlParser = PTService.filters.parseURL(location.href);
let site = PTService.getSiteFromHost(urlParser.host);
let urls = PTService.getFieldValue("downloadURLs");
if (!urls) {
let links = $("a[href*='/api/torrent/download/']").toArray();
if (links.length === 0) {
// "获取下载链接失败,未能正确定位到链接";
return this.t("getDownloadURLsFailed");
}
urls = $.map(links, item => {
let url = $(item)
.attr("href");
// if (url) {
// if (url.indexOf("passkey=") === -1 && PTService.site.passkey) {
// url += "&passkey=" + PTService.site.passkey;
// }
// }
return url;
});
}
if (urls) {
urls = urls.map((x) => {
return this.getFullURL(x)
})
}
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$(".torrents").find(
"td:contains('MB'),td:contains('GB'),td:contains('TB'),td:contains('MiB'),td:contains('GiB'),td:contains('TiB')"
)
);
}
/**
* 获取有效的拖放地址
* @param {*} url
*/
getDroperURL(url) {
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (!url.getQueryString) {
PTService.showNotice({
msg:
"系统依赖函数(getQueryString)未正确加载,请尝试刷新页面或重新启用插件。"
});
return null;
}
if (url.indexOf("download.php") === -1) {
let id = url.getQueryString("id");
if (id) {
// 如果站点没有配置禁用https,则默认添加https链接
url =
siteURL +
"download.php?id=" +
id +
(PTService.site.passkey
? "&passkey=" + PTService.site.passkey
: "") +
(PTService.site.disableHttps ? "" : "&https=1");
} else {
url = "";
}
}
return url;
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/schemas/UNIT3D/config.json
================================================
{
"name": "UNIT3D",
"ver": "0.0.1",
"plugins": [{
"name": "种子详情页面",
"pages": ["^/torrents/(.+)$", "^/torrent/(.+)$"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["^/torrents$"],
"scripts": ["/schemas/NexusPHP/common.js", "torrents.js"]
}, {
"name": "个人种子列表页面",
"pages": ["^/users/.*?/(uploads|downloads|seeds|active|torrents|unsatisfieds)"],
"scripts": ["/schemas/NexusPHP/common.js", "userTorrents.js"]
}],
"searchEntryConfig": {
"page": "/torrents",
"queryString": "perPage=100&name=$key$",
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"queryString": "perPage=100&imdbId=$key$",
"replaceKey": [
"tt", ""
]
}],
"fieldSelector": {
"progress": {
"selector": ["button.btn.btn-success.btn-circle", "button.btn.btn-warning.btn-circle, button.btn.btn-info.btn-circle", ""],
"switchFilters": [
["100"],
["0"],
["null"]
]
},
"status": {
"selector": ["button.btn.btn-success.btn-circle", "button.btn.btn-warning.btn-circle", "button.btn.btn-info.btn-circle"],
"switchFilters": [
["2"],
["1"],
["3"]
]
}
},
"resultType": "html",
"parseScriptFile": "getSearchResult.js"
},
"searchEntry": [{
"name": "全部",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "i.fa-star.text-gold, i.fa-globe.text-blue"
}, {
"name": "2xUp",
"selector": "i.fa-gem.text-green"
}],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"name": {
"selector": ["a[href*='settings']:first"],
"attribute": "href",
"switchFilters": [
["new URL(query).pathname.split('/')", "(query && query.length>2)?(query[2]):''"],
["query ? query.getQueryString('id'):''"]
]
},
"uploaded": {
"selector": ["div.ratio-bar i.fa-arrow-up, ul.top-nav__ratio-bar i.fa-arrow-up, span[title='Upload'], span[title='上传']"],
"filters": ["query.parent().text().trim().replace(/,|\\s|\\n/g,'').match(/[\\d.]+ ?[ZEPTGMK]?i?B/)", "(query && query.length>=1)?(query[0]).sizeToNumber():0"]
},
"downloaded": {
"selector": ["div.ratio-bar i.fa-arrow-down, ul.top-nav__ratio-bar i.fa-arrow-down, span[title='Download'], span[title='下载']"],
"filters": ["query.parent().text().trim().replace(/,|\\s|\\n/g,'').match(/[\\d.]+ ?[ZEPTGMK]?i?B/)", "(query && query.length>=1)?(query[0]).sizeToNumber():0"]
},
"bonus": {
"selector": ["div.ratio-bar i.fa-coins, ul.top-nav__ratio-bar i.fa-coins, a[title='My Bonus Points'], a[title='我的魔力']"],
"filters": ["query.parent().text().trim().replace(/,|\\s|\\n/g,'').match(/[\\d.]+/)", "(query && query.length>=1)?parseFloat(query[0]):0"]
},
"seeding": {
"selector": ["div.ratio-bar i.fa-upload, ul.top-nav__ratio-bar i.fa-upload, span[title='Seeding'], span[title='做种']"],
"filters": ["query.parent().text().trim().replace(/,|\\s|\\n/g,'').match(/[\\d.]+/)", "(query && query.length>=1)?parseFloat(query[0]):0"]
},
"bonusPage": {
"selector": ["a[href$='bonus']:first","a[href$='earnings']:first"],
"attribute": "href",
"filters": ["query ? new URL(query).pathname : null"]
}
}
},
"userExtendInfo": {
"page": "/users/$user.name$",
"fields": {
"seedingSize": {
"selector": ["table.table-condensed.table-striped.table-bordered:first td:contains('Seeding Size') + td", "table.table-condensed.table-striped.table-bordered:first td:contains('做种体积') + td", "table.table-condensed.table-striped.table-bordered:first td:contains('做種體積') + td"
, ".panelV2 dt:contains('Seeding Size') + dd", ".panelV2 dt:contains('做种体积') + dd", ".panelV2 dt:contains('做種體積') + dd"],
"filters": ["query.text().trim().replace(/,|\\s|\\n/g,'').sizeToNumber()"]
},
"levelName": {
"selector": ["div.content span.badge-user", "a.user-tag__link"],
"switchFilters": [["query.text()"],["query.attr('title')"]]
},
"messageCount": {
"selector": [".point, ul.top-nav__icon-bar circle"],
"filters": ["query.length?'11':'0'"]
},
"joinTime": {
"selector": ["div.content h4:contains('Registration date')", "div.content h4:contains('注册日期')", "div.content h4:contains('註冊日期')", "time.profile__registration"],
"filters": ["query.text().replace(/(Registration date|注册日期|註冊日期)/g, '').trim()", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
},
"uploads": {
"selector": [".badge-user .fa-upload + span"],
"filters": ["query ? parseFloat(query.text().trim()) : 0"]
},
"unsatisfiedsPage": {
"selector": ["a[href$='unsatisfieds']:first"],
"attribute": "href",
"filters": ["query ? new URL(query).pathname : null"]
}
}
},
"bonusExtendInfo": {
"prerequisites": "!(!user.bonusPage)",
"page": "$user.bonusPage$",
"fields": {
"bonusPerHour": {
"selector": [".table-condensed tr:last"],
"filters": ["parseFloat(query.text().match(/[\\d.]+/)[0])"]
}
}
},
"hnrExtendInfo": {
"prerequisites": "!(!user.unsatisfiedsPage)",
"page": "$user.unsatisfiedsPage$",
"fields": {
"unsatisfieds": {
"selector": ["tr[class='userFiltered'][hr='0'][immune='0']"],
"filters": ["query ? query.length : 0"]
}
}
},
"common": {
"fields": {
"size": {
"selector": ["td.col-sm-2:contains('Size') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"]
},
"sayThanksButton": {
"selector": [".button-block button.btn.btn-sm.btn-primary"],
"filters": ["$(query[0])"]
}
}
}
}
}
================================================
FILE: resource/schemas/UNIT3D/details.js
================================================
(function($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
let url = PTService.getFieldValue("downloadURL");
if (!url) {
let query = $("a[href*='/download/']:first");
if (query.length == 0) {
query = $("a[href*='/download_check/']");
if (query.length > 0) {
url = query.attr("href").replace("/download_check/", "/download/");
}
} else {
url = query.attr("href");
}
}
return this.getFullURL(url);
}
/**
* 获取当前种子IMDb Id
*/
getIMDbId() {
try
{
let imdbId = PTService.getFieldValue("imdbId");
console.log(imdbId);
if (imdbId)
return imdbId;
else {
const link = $("a[href*='www.imdb.com/title/']:first");
if (link.length > 0) {
let match = link.attr("href").match(/(tt\d+)/);
if (match && match.length >= 2)
return imdbId = match[1];
}
}
} catch {
}
return null;
}
}
new App().init();
})(jQuery, window);
================================================
FILE: resource/schemas/UNIT3D/getSearchResult.js
================================================
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
if (/\/login/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
this.haveData = true;
this.site = options.site;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let site = options.site;
let selector =
options.resultSelector || "table.data-table";
let table = options.page.find(selector);
// 获取种子列表行
let rows = table.find("> tbody > tr");
if (rows.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return [];
}
let results = [];
// 获取表头
let header = table.find("> thead > tr > th");
let beginRowIndex = 0;
if (header.length == 0) {
beginRowIndex = 1;
header = rows.eq(0).find("th,td");
}
// 用于定位每个字段所列的位置
let fieldIndex = {
// 发布时间
time: -1,
// 大小
size: -1,
// 上传数量
seeders: -1,
// 下载数量
leechers: -1,
// 完成数量
completed: -1,
// 评论数量
comments: -1,
// 分类
category: 0
};
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
// 获取字段所在的列
for (let index = 0; index < header.length; index++) {
let cell = header.eq(index);
let text = cell.text();
// 发布时间
if (cell.html().match("created_at") || cell.attr('class').endsWith("age-header")) {
fieldIndex.time = index;
continue;
}
// 大小
if (cell.attr('class').indexOf("torrent-listings-size") > -1 || cell.attr('class').endsWith("size-header") || cell.find("i.fa-database").length) {
fieldIndex.size = index;
continue;
}
// 种子数
if (cell.find("i.fa-arrow-alt-circle-up").length) {
fieldIndex.seeders = index;
continue;
}
// 下载数
if (cell.find("i.fa-arrow-alt-circle-down").length) {
fieldIndex.leechers = index;
continue;
}
// 完成数
if (cell.find("i.fa-check-circle").length) {
fieldIndex.completed = index;
continue;
}
}
try {
// 遍历数据行
for (let index = beginRowIndex; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = row.find("a.view-torrent, a.torrent-search--list__name");
if (title.length == 0) {
continue;
}
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
// 获取下载链接
let url = "";
let downloadURL = row.find("a[href*='/download/']");
if (downloadURL.length == 0) {
downloadURL = row.find("a[href*='/download_check/']");
if (downloadURL.length > 0) {
url = downloadURL
.attr("href")
.replace("/download_check/", "/download/");
}
} else {
url = downloadURL.attr("href");
}
if (url.length == 0) {
continue;
}
if (url && url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
let imdbId = row.find("div#imdb_id")
if (imdbId.length > 0)
{
imdbId = imdbId.text().replace(/\D/g,'');
if (imdbId.length < 7)
imdbId = imdbId.padStart(7, '0');
imdbId = "tt" + imdbId;
}
else {
imdbId = null;
}
let data = {
title: title.text().trim(),
subTitle: this.getSubTitle(title, row).trim(),
link,
url: url,
size:
cells
.eq(fieldIndex.size)
.text()
.trim() || 0,
time:
fieldIndex.time == -1
? ""
: cells
.eq(fieldIndex.time)
.find("span[title]")
.attr("title") ||
cells.eq(fieldIndex.time).text().replace('秒前', ' seconds ago').replace('秒前', ' seconds ago').replace('分钟前', ' minutes ago').replace('分鐘前', ' minutes ago').replace('天前', ' day ago').replace('小時前', ' hours ago').replace('小时前', ' hours ago').replace('周前', ' weeks ago').replace('个月前', ' months ago').replace('年前', ' years ago')||
"",
author: "",
seeders:
fieldIndex.seeders == -1
? ""
: cells.eq(fieldIndex.seeders).text().trim() || 0,
leechers:
fieldIndex.leechers == -1
? ""
: cells.eq(fieldIndex.leechers).text().trim() || 0,
completed:
fieldIndex.completed == -1
? ""
: cells.eq(fieldIndex.completed).text().trim() || 0,
comments:
fieldIndex.comments == -1
? ""
: cells.eq(fieldIndex.comments).text().trim() || 0,
site: site,
tags: Searcher.getRowTags(site, row),
entryName: options.entry.name,
category:
fieldIndex.category == -1
? null
: this.getCategory(cells.eq(fieldIndex.category)),
progress: this.getFieldValue(row, cells, fieldIndex, "progress"),
status: this.getFieldValue(row, cells, fieldIndex, "status"),
imdbId: imdbId
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; // `[${options.site.name}]没有搜索到相关的种子`;
}
} catch (error) {
console.log(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.stack}`;
}
return results;
}
/**
* 获取副标题
* @param {*} title
* @param {*} row
*/
getSubTitle(title, row) {
let subTitle = Searcher.getFieldValue(this.site, row, "subTitle");
if (subTitle) {
return subTitle;
}
return "";
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: cell.find("i:first").attr("data-original-title"),
link: cell.find("a:first").attr("href")
};
if (result.name) {
result.name = result.name.replace(" torrent", "");
}
return result;
}
getFieldValue(row, cells, fieldIndex, fieldName, returnCell) {
let parent = row;
let cell = null;
if (
cells &&
fieldIndex &&
fieldIndex[fieldName] !== undefined &&
fieldIndex[fieldName] !== -1
) {
cell = cells.eq(fieldIndex[fieldName]);
parent = cell || row;
}
let result = Searcher.getFieldValue(site, parent, fieldName);
if (!result && cell) {
if (returnCell) {
return cell;
}
result = cell.text().trim();
}
if(result == "")return null;
return result;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/schemas/UNIT3D/torrents.js
================================================
(function($) {
console.log("this is torrent.js");
class App extends window.NexusPHPCommon {
init() {
// super();
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $("a[href*='/download/']").toArray();
if (links.length == 0) {
links = $("a[href*='/download_check/']").toArray();
}
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (links.length == 0) {
// "获取下载链接失败,未能正确定位到链接";
return this.t("getDownloadURLsFailed");
}
let urls = $.map(links, item => {
let link = $(item).attr("href");
if (link && link.substr(0, 4) != "http") {
link = siteURL + link;
}
return link.replace("/download_check/", "/download/");
});
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("div.table-responsive > table:first").find(
"td:contains('MiB'),td:contains('GiB'),td:contains('TiB')"
)
);
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/schemas/UNIT3D/userTorrents.js
================================================
(function($) {
console.log("this is userTorrents.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $("a.view-torrent[href*='/torrents/']").toArray();
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (links.length == 0) {
// "获取下载链接失败,未能正确定位到链接";
return this.t("getDownloadURLsFailed");
}
let urls = $.map(links, item => {
let link = $(item).attr("href");
if (link && link.substr(0, 4) != "http") {
link = siteURL + link;
}
return link.replace("/torrents/", "/torrents/download/");
});
return urls;
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/1ptba.com/config.json
================================================
{
"name": "1PTBar",
"schema": "NexusPHP",
"url": "https://1ptba.com/",
"description": "壹PT吧,PT下载,教育视频,课件资源,发布教育类,学习类,纪录片等资源",
"icon": "https://1ptba.com/kuai360/favicon.ico",
"tags": ["影视", "综合"],
"host": "1ptba.com",
"collaborator": ["zhuweitung"],
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "5",
"downloaded": "50GB",
"ratio": "1.3",
"seedingPoints": "40000",
"privilege": "得到一个邀请名额;可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.9",
"seedingPoints": "80000",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.3",
"seedingPoints": "150000",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "30",
"downloaded": "500GB",
"ratio": "2.7",
"seedingPoints": "250000",
"privilege": "可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "60",
"downloaded": "1024GB",
"ratio": "3.2",
"seedingPoints": "400000",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "90",
"downloaded": "2048GB",
"ratio": "3.7",
"seedingPoints": "600000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "120",
"downloaded": "4096GB",
"ratio": "4.2",
"seedingPoints": "800000",
"privilege": "得到五个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "150",
"downloaded": "10240GB",
"ratio": "5.2",
"seedingPoints": "1000000",
"privilege": "得到十个邀请名额。"
}
],
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["b:first"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
},
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"],
"filters": ["query ? parseFloat(query.attr('title').match(/[\\d.]+/)) : null"]
},
"status": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"],
"filters": [
"query ? query.attr('title') : ''",
"query.indexOf('seeding') != -1 ? 2 : query.indexOf('leeching') != -1 ? 1 : query.indexOf('100%') != -1 ? 255 : 3"
]
}
}
}
}
================================================
FILE: resource/sites/52pt.site/config.json
================================================
{
"name": "52PT",
"timezoneOffset": "+0800",
"schema": "NexusPHP",
"url": "https://52pt.site/",
"description": "52PT - 我爱PT-低调地在这个PT校园快乐成长 快乐分享",
"tags": ["高清", "电影", "电视剧"],
"host": "52pt.site",
"collaborator": ["StarGazerQQD", "zhuweitung"],
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"privilege": "得到一个邀请名额;可以查看NFO文档;可以请求续种;可以发送邀请;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\");允许发布新的趣味盒内容及编辑自己发布的趣味盒内容;可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"downloaded": "1536GB",
"ratio": "2.55",
"privilege": "可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "40",
"downloaded": "2560GB",
"ratio": "3.05",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "60",
"downloaded": "3072GB",
"ratio": "3.55",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "80",
"downloaded": "4608GB",
"ratio": "4.05",
"privilege": "得到五个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "100",
"downloaded": "5632GB",
"ratio": "4.55",
"privilege": "得到十个邀请名额。"
}
]
}
================================================
FILE: resource/sites/README.md
================================================
# 站点定义
## 目录说明
该目录存放所有支持的网站,目录名为网站域名
```
--目录名
----parser
-------xxxx.js
----config.json
----xxxx.js
```
- parser : (可选)解析器目录,会在打包时自动将该目录下的所有 js 文件内容生成到 config.js 文件中的 `parser` 字段中
- config.json : 网站的定义
- xxxx.js : (可选)页面对应的脚本文件
### config.json 文件示例
```json
{
"name": "OpenCD",
"description": "皇后,专一的音乐类PT站,是目前国内最大的无损音乐PT",
"url": "https://open.cd/",
"icon": "https://open.cd/favicon.ico",
"tags": ["音乐"],
"schema": "NexusPHP",
"host": "open.cd",
"plugins": [
{
"name": "特殊插件",
"pages": ["/torrents.php"],
"scripts": ["/libs/album/album.js", "torrents.js"],
"styles": ["/libs/album/style.css"]
}
],
"searchEntry": [
{
"entry": "/torrents.php?search=$key$",
"name": "全部",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrent_list:last > tbody > tr"
}
],
"patterns": {
"torrentLinks": ["*://*/*"]
},
"parser": {
"downloadURL": "解析脚本内容"
},
"torrentTagSelectors": [
{
"name": "Free",
"selector": "img.pro_free",
"color": "blue"
}
],
"categories": [
{
"entry": "*",
"result": "cat$id$=1",
"category": [
{
"id": 20,
"name": "原盘(Full BD)"
}
]
}
]
}
```
### 属性说明:
- `name` : 网站名称;
- `description` : (可选)网站描述;
- `url` : 完整的网站地址,如果网站支持 `https` ,请优先考虑填写 `https` 的地址 ;
- `icon` : 网站图标地址;
- `tags` : (可选)标签,是一个数组,多个之间以 `,` 分隔;
- `schema` : 对应的网站架构;
- `host` : 域名;
- `plugins` : (可选)支持的插件列表,是一个数组
- `name` : 插件名称;
- `pages` : 表示该插件在哪些页面加载;
- `scripts` : 插件对应的脚本文件,`JavaScript` 文件
- `searchEntry` : (可选)搜索入口配置,如果指定则必需为数组,如果不指定则以网站架构定义的为准
- `entry` : 入口文件
- `name` : 自定义入口的名称
- `resultType` : 搜索返回的原始结果类型:html, json, xml
- `parseScriptFile` : 解析原始结果的脚本文件
- `resultSelector` : 定位种子列表的 `jQuery` 查询表达式
- `patterns` : (可选)页面匹配规则
- `torrentLinks` : 用于匹配有效的种子链接,作用于右键菜单,如果不指定,则匹配所有链接;
- `parser` : (可选)解析器,打包时根据 parser 目录生成
- `downloadURL` : 解析下载链接,用于解析和生成点击右键下载时的链接
- `torrentTagSelectors` : (可选)种子标签选择器,数组
- `name` : 标签名称
- `selector` : 选择器
- `color` : 标签颜色
- `categories` : 站点对应搜索入口的种子分类信息,数组
- `entry` : 需要匹配的入口,`*` 表示适用于所有入口;`torrents.php` 表示只适用于 `torrents.php` 的入口页面
- `result` : 分类配置返回信息 `$id$` 会被替换为具体的分类编号,最终会拼接到入口地址后面,如:`&cat10=1&cat11=1`
- `category` : 分类信息,数组
- `id` : 分类编号
- `name` : 分类名称
### 脚本及脚本文件定义
脚本文件及脚本片段,请使用 `闭包` ,以避免 `命名污染` 。
### 关于脚本及其他资源文件路径说明
- 如果在第一个位置指定了 `/` ,则路径会被指向到:
- `https://github.com/pt-plugins/PT-Plugin-Plus/tree/master/resource/`
- 如果第一个位置不是 `/` ,则表示当前路径为该网站所在目录,如 `open.cd` 的指向目录为:
- `https://github.com/pt-plugins/PT-Plugin-Plus/tree/master/resource/sites/open.cd/`
## 如何提交一个新的站点?
> 由于本人精力及能力有限,仅能维护部分站点,如果你有更多更好玩的站点需要在助手中直接下拉选择显示,并愿意分享给其他用户使用,那么赶紧通过以下方式提交吧;(怎么听着像广告~\_~)
1. 如果你有 `github` 账户,并知道如何使用 `git` ,那么可以按以下步骤进行提交
- `Fork` 本项目;
- 将 `Fork` 后的项目 `clone` 到本地;
- 在项目的 `resource\sites` 目录下新建一个站点目录,如:`pt.mysite.com`
- 在 `pt.mysite.com` 目录下新建一个 `config.json` 文件,内容参考上面的 `config.json 文件示例`;
- 如有需要,再创建特定的脚本;
- 以上操作完成后,使用 `git` 将修改内容 `push` 到自己的 `github` 仓库;
- 最后在 `github` 仓库中发起一个 `PR(pull request)` 即可;
2. 加入开发交流 QQ 群:773500545,把你的配置文件分享给我们吧;
3. 通过 [该主题](https://github.com/pt-plugins/PT-Plugin-Plus/issues/30) 留言,按格式提交已测试可用的站点信息;
## PR 参考资料
- https://blog.csdn.net/vim_wj/article/details/78300239
- http://www.ruanyifeng.com/blog/2017/07/pull_request.html
- https://gist.github.com/zxhfighter/62847a087a2a8031fbdf
- https://github.com/geeeeeeeeek/git-recipes/wiki/3.3-%E5%88%9B%E5%BB%BA-Pull-Request
================================================
FILE: resource/sites/aidoru-online.me/config.json
================================================
{
"name": "Aidoru!Online",
"timezoneOffset": "+0000",
"description": "AO",
"icon": "https://aidoru-online.me/themes/default/images/favicon.ico",
"url": "https://aidoru-online.me/",
"tags": ["偶像"],
"schema": "Common",
"plugins": [{
"name": "种子详情页面",
"pages": ["/torrents-details.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/details.js"]
}, {
"name": "种子列表",
"pages": ["/torrents-today.php", "/torrents-search.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/torrents.js"]
}],
"host": "aidoru-online.me",
"searchEntryConfig": {
"skipIMDbId": true,
"page": "/get_ttable.php?pcat=Show+All&subbed=&fl=&resd=&p=0&searchstr=$key$&deadlive=1&sortcol=id&sortorder=desc&startdt=&enddt=",
"loggedRegex": "class=\"ttable_headinner\"",
"resultType": "html",
"resultSelector": "table",
"fieldIndex": {
"category": 0,
"title": 1,
"link": 1,
"url": 2,
"comments": 5,
"time": 10,
"size": 6,
"author": 4,
"seeders": 7,
"leechers": 8,
"completed": 9
},
"fieldSelector": {
"title": {
"selector": ["a"],
"filters": ["query.text()"]
},
"link": {
"selector": ["a"],
"filters": ["query.attr('href')", "'https://aidoru-online.me/'+query"]
},
"url": {
"selector": [""],
"filters": ["query.children().attr('href')", "'https://aidoru-online.me/'+query"]
},
"time": {
"selector": [""],
"filters": ["'20'+query.text()"]
},
"progress": {
"selector": ["td.ttable_seeding font[color='green'], td.ttable_seeding font[color='black']", "td.ttable_seeding font[color='#ff0000']", ""],
"switchFilters": [
["query.length > 0 ? 100:null"],
["query.length > 0 ? 0:null"],
["null"]
]
},
"status": {
"selector": ["td.ttable_seeding font[color='green']", "td.ttable_seeding font[color='black']", "td.ttable_seeding font[color='#ff0000']"],
"switchFilters": [
["2"],
["255"],
["1"]
]
}
}
},
"searchEntry": [{
"name": "全部",
"enabled": true
}, {
"appendQueryString": "&scat=1",
"name": "BD/DVDISO",
"enabled": false
}, {
"appendQueryString": "&scat=2",
"name": "BD/DVD-RIP",
"enabled": false
}, {
"appendQueryString": "&scat=3",
"name": "TV",
"enabled": false
}, {
"appendQueryString": "&scat=4",
"name": "Perf",
"enabled": false
}, {
"appendQueryString": "&scat=5",
"name": "PV",
"enabled": false
}, {
"appendQueryString": "&scat=6",
"name": "PV",
"enabled": false
}, {
"appendQueryString": "&scat=7",
"name": "Image",
"enabled": false
}, {
"appendQueryString": "&scat=8",
"name": "Audio",
"enabled": false
}, {
"appendQueryString": "&scat=9",
"name": "Album",
"enabled": false
}, {
"appendQueryString": "&scat=10",
"name": "Single",
"enabled": false
}, {
"appendQueryString": "&scat=11",
"name": "Radio",
"enabled": false
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "img[src='images/freeleech.png']"
}],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"name": {
"selector": "#main > table .myBlock-caption:first"
},
"isLogged": {
"selector": ["a[href*='account-logout.php']"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["a[href*='/forum/private.php']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
},
"uploaded": {
"selector": [".myBlock-content td:contains('Uploaded:') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": [".myBlock-content td:contains('Downloaded:') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"ratio": {
"selector": [".myBlock-content td:contains('Ratio:') + td"],
"filters": ["query.text()"]
},
"levelName": {
"selector": [".myBlock-content td:contains('Class:') + td"],
"filters": ["query.text()"]
},
"bonus": {
"value": "N/A"
}
}
},
"userExtendInfo": {
"page": "/account.php",
"fields": {
"joinTime": {
"selector": ["td.prof-lbl:contains('Joined:') + td"],
"filters": ["dateTime(query.text()).valueOf()"]
},
"seeding": {
"selector": ["b:contains('Currently seeding')"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):null"]
},
"seedingSize": {
"selector": ["b:contains('Currently seeding') + br + table tr:not(:first-child) > td:nth-child(4)"],
"filters": ["jQuery.map(query, (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
}
}
},
"common": {
"page": "/torrents-details.php",
"fields": {
"downloadURL": {
"selector": ["a[href*='download.php?id=']"],
"filters": ["query.attr('href')"]
},
"size": {
"selector": ["td[align='left']:contains('Total Size:') + td"],
"filters": ["query.parent().text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"]
},
"sayThanksButton": {
"selector": ["#ty-button"],
"filters": ["query"]
},
"downloadURLs": {
"selector": ["a[href*='download.php?id=']"],
"filters": ["query.toArray()"]
},
"confirmSize": {
"selector": ["table.ttable_headinner"],
"filters": ["query.find('td.ttable_size')"]
}
}
}
}
}
================================================
FILE: resource/sites/aither.cc/config.json
================================================
{
"name": "Aither",
"timezoneOffset": "+0800",
"schema": "UNIT3D",
"url": "https://aither.cc/",
"description": "Aither",
"tags": [
"综合"
],
"host": "aither.cc",
"collaborator": "MewX",
"levelRequirements": [
{
"level": "1",
"name": "Harmonia",
"interval": "1",
"uploaded": "500Gib",
"privilege": "Unlimited DL slots"
},
{
"level": "2",
"name": "Zeus",
"interval": "2",
"uploaded": "1TiB"
},
{
"level": "3",
"name": "Helios",
"interval": "3",
"uploaded": "5TiB"
},
{
"level": "4",
"name": "Prometheus",
"interval": "4",
"uploaded": "10TiB"
},
{
"level": "5",
"name": "Oceanus",
"interval": "4",
"uploaded": "20TiB",
"privilege": "Mod Q skip, Special FL, Invite Forum, Sparkly name"
},
{
"level": "6",
"name": "Gigantes",
"interval": "12",
"uploaded": "40TiB",
"privilege": "Mod Q skip, Special FL, Invite Forum, Sparkly name, HnR immunity"
}
]
}
================================================
FILE: resource/sites/alpharatio.cc/config.json
================================================
{
"name": "AlphaRatio",
"timezoneOffset": "+0000",
"description": "0day",
"url": "https://alpharatio.cc/",
"icon": "https://alpharatio.cc/favicon.ico",
"tags": ["综合", "0day"],
"schema": "GazelleJSONAPI",
"host": "alpharatio.cc",
"collaborator": "enigamz",
"searchEntry": [{
"name": "all",
"enabled": true
},
{
"queryString": "filter_cat[1]=1",
"name": "TvSD",
"enabled": false
},
{
"queryString": "filter_cat[2]=1",
"name": "TvHD",
"enabled": false
},
{
"queryString": "filter_cat[3]=1",
"name": "TvUHD",
"enabled": false
},
{
"queryString": "filter_cat[4]=1",
"name": "TvDVDRip",
"enabled": false
},
{
"queryString": "filter_cat[5]=1",
"name": "TvPackSD",
"enabled": false
},
{
"queryString": "filter_cat[6]=1",
"name": "TvPackHD",
"enabled": false
},
{
"queryString": "filter_cat[7]=1",
"name": "TvPackUHD",
"enabled": false
},
{
"queryString": "filter_cat[8]=1",
"name": "MovieSD",
"enabled": false
},
{
"queryString": "filter_cat[9]=1",
"name": "MovieHD",
"enabled": false
},
{
"queryString": "filter_cat[10]=1",
"name": "MovieUHD",
"enabled": false
},
{
"queryString": "filter_cat[11]=1",
"name": "MoviePackSD",
"enabled": false
},
{
"queryString": "filter_cat[12]=1",
"name": "MoviePackHD",
"enabled": false
},
{
"queryString": "filter_cat[13]=1",
"name": "MoviePackUHD",
"enabled": false
},
{
"queryString": "filter_cat[14]=1",
"name": "MovieXXX",
"enabled": false
},
{
"queryString": "filter_cat[15]=1",
"name": " Bluray",
"enabled": false
},
{
"queryString": "filter_cat[16]=1",
"name": "AnimeSD",
"enabled": false
},
{
"queryString": "filter_cat[17]=1",
"name": "AnimeHD",
"enabled": false
},
{
"queryString": "filter_cat[18]=1",
"name": "GamesPC",
"enabled": false
},
{
"queryString": "filter_cat[19]=1",
"name": "GamesxBox",
"enabled": false
},
{
"queryString": "filter_cat[20]=1",
"name": "GamesPS",
"enabled": false
},
{
"queryString": "filter_cat[21]=1",
"name": "GamesNin",
"enabled": false
},
{
"queryString": "filter_cat[22]=1",
"name": "AppsWindows",
"enabled": false
},
{
"queryString": "filter_cat[23]=1",
"name": "AppsMAC",
"enabled": false
},
{
"queryString": "filter_cat[24]=1",
"name": "AppsLinux",
"enabled": false
},
{
"queryString": "filter_cat[25]=1",
"name": "AppsMobile",
"enabled": false
},
{
"queryString": "filter_cat[26]=1",
"name": "0dayXXX",
"enabled": false
},
{
"queryString": "filter_cat[27]=1",
"name": "eBook",
"enabled": false
},
{
"queryString": "filter_cat[28]=1",
"name": "AudioBook",
"enabled": false
},
{
"queryString": "filter_cat[29]=1",
"name": "Music",
"enabled": false
},
{
"queryString": "filter_cat[30]=1",
"name": "Misc",
"enabled": false
}
],
"supportedFeatures": {
"imdbSearch": false,
"userData": "◐"
}
}
================================================
FILE: resource/sites/animebytes.tv/config.json
================================================
{
"name": "AB",
"timezoneOffset": "+0000",
"description": "动漫",
"url": "https://animebytes.tv/",
"icon": "https://animebytes.tv/favicon.ico",
"tags": ["动漫"],
"schema": "",
"host": "animebytes.tv",
"collaborator": [
"MewX",
"sabersalv"
],
"supportedFeatures": {
"userData": true,
"search": true,
"imdbSearch": false,
"sendTorrent": false
},
"plugins": [
{
"name": "Custom Torrent List",
"pages": [
"/series.php",
"/torrents.php",
"/torrents2.php"
],
"scripts": [
"/schemas/NexusPHP/common.js",
"userTorrents.js"
]
}
],
"securityKeyFields": [
"authkey",
"torrent_pass"
],
"searchEntry": [
{
"entry": "/torrents.php?searchstr=$key$&force_default=1",
"name": "default",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "div.group_cont",
"enabled": true
}
],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"id": {
"selector": ["#stats_menu > a:first"],
"attribute": "href",
"filters": ["query ? query.getQueryString('userid'):''"]
},
"name": {
"selector": ["a.username:first"]
},
"isLogged": {
"selector": ["a[href*='/user/logout']"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": [".alertbar.message a[href*='inbox.php']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
}
}
},
"userExtendInfo": {
"page": "/user.php?id=$user.id$",
"fields": {
"uploads":{
"selector": ["dt:contains('Torrents Uploaded:') + dd"],
"filters": ["query.text().replace(/,/g,'').match(/[\\d]+/)[0]", "parseInt(query)"]
},
"uploaded": {
"selector": ["dt:contains('Uploaded:') + dd > span"],
"filters": ["query.attr('title').replace(/,/g,'')", "parseFloat(query)"]
},
"downloaded": {
"selector": ["dt:contains('Downloaded:') + dd > span"],
"filters": ["query.attr('title').replace(/,/g,'')", "parseFloat(query)"]
},
"unsatisfieds": {
"selector": ["ul.stats li:contains('H&Rs:')"],
"attribute": "title",
"filters": ["query.replace(/,/g,'').match(/[\\d]+/g)", "query && query.length >= 2 ? parseInt(query[1]) : 0"]
},
"ratio": {
"selector": ["dt:contains('Ratio:') + dd > span"],
"attribute": "title",
"filters": ["query ? query.replace(/,/g,'') : null"]
},
"seeding": {
"selector": ["dt:contains('Seeding:') + dd"],
"filters": [
"query.text().trim().replace(/,|\\n/g,'').match(/([\\d.]+)/)",
"(query && query.length>=2)?parseFloat(query[1]):null"
]
},
"seedingSize": {
"selector": ["dt:contains('Total seed size:') + dd > span"],
"filters": ["query.text().trim().sizeToNumber()"]
},
"levelName": {
"selector": ["dt:contains('Class:') + dd"],
"filters": ["query.text()"]
},
"bonus": {
"selector": ["#yen_count > a"],
"filters": ["query.text().replace(/,|\\n|\\s+|¥/g,'')"]
},
"bonusPerHour": {
"selector": ["dt:contains('Yen per day:') + dd"],
"filters": ["query.text().replace(/,/g,'').match(/[\\d.]+/)", "query ? parseFloat(query[0]) / 24 : 0"]
},
"joinTime": {
"selector": ["dt:contains('Joined:') + dd > span"],
"filters": [
"query.attr('title')||query.text()",
"dateTime(query, 'MMM DD YYYY, HH:mm').isValid()?dateTime(query, 'MMM DD YYYY, HH:mm').valueOf():query"
]
}
}
}
}
}
================================================
FILE: resource/sites/animebytes.tv/getSearchResult.js
================================================
if (!"".getQueryString) {
String.prototype.getQueryString = function (name, split) {
if (split == undefined) split = "&";
var reg = new RegExp(
"(^|" + split + "|\\?)" + name + "=([^" + split + "]*)(" + split + "|$)"
),
r;
if ((r = this.match(reg))) return decodeURI(r[2]);
return null;
};
}
(function (options) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/loginform/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
if (/File slips through fingers/.test(options.responseText)) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
return;
}
this.haveData = true;
}
/**
* Get search results.
*/
getResult() {
let site = options.site;
let results = [];
// Get groups. Each group has one title and several torrents.
let groups = options.page.find(options.resultSelector);
if (groups.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return results;
}
try {
for (let ig = 0; ig < groups.length; ig++) {
// Get group info.
let group = groups.eq(ig);
let groupTitle = group.find(".group_title").find("strong:first").text();
if (groupTitle.length == 0) {
continue;
}
let category = group.find("span.cat:first").text();
// Get torrent info.
let torrents = group.find(".torrent_group:first").find("tr.torrent");
for (let i = 0; i < torrents.length; i++) {
let t = torrents.eq(i);
let subTitle = t.find(".torrent_properties:first").find("a:last").text();
let dlLink = site.url + t.find(".download_link:first").find("a:first").attr("href");
let torrentURL = site.url + t.find(".torrent_properties:first").find("a:last").attr("href");
let size = t.find(".torrent_size:first").text();
let snatched = t.find(".torrent_snatched:first").text();
let seeders = t.find(".torrent_seeders:first").text();
let leechers = t.find(".torrent_leechers:first").text();
// Basic validations.
if (dlLink.length == 0) {
console.log("[%s] Invalid torrent link for \"%s\": %s", site.name, groupTitle, dlLink);
continue;
}
let data = {
title: groupTitle,
subTitle: subTitle,
link: torrentURL, // Note: link means the torrent page.
url: dlLink, // Note: url means the download link.
size: size,
time: "",
author: "",
seeders: seeders,
leechers: leechers,
completed: snatched,
comments: "",
site: site,
entryName: options.entry.name, // TODO: support specifying entry name.
category: category,
};
results.push(data);
}
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
}
} catch (error) {
console.error(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.stack}`;
}
return results;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options);
================================================
FILE: resource/sites/animebytes.tv/userTorrents.js
================================================
(function ($) {
console.log("this is userTorrents.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $("a[title='Download torrent']").toArray();
console.log(links);
if (links.length == 0) {
return this.t("getDownloadURLsFailed"); //"获取下载链接失败,未能正确定位到链接";
}
let urls = $.map(links, item => {
let link = $(item).attr("href");
return this.getFullURL(link);
});
console.log(urls);
return urls;
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/anthelion.me/config.json
================================================
{
"name": "Anthelion",
"timezoneOffset": "+0000",
"description": "Movies",
"url": "https://anthelion.me//",
"icon": "https://anthelion.me/favicon.ico",
"tags": ["电影"],
"schema": "GazelleJSONAPI",
"host": "anthelion.me",
"collaborator": "enigamz",
"searchEntryConfig": {
"skipIMDbId": true,
"parseScriptFile": "getSearchResult.js"
},
"searchEntry": [{
"name": "all",
"enabled": true
}],
"selectors": {
"userSeedingTorrents": {
"page": "/torrents.php?type=seeding&userid=$user.id$",
"fields": {
"seedingSize": {
"selector": ["tr.torrent_row > td.nobr"],
"filters": ["jQuery.map(query, (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
},
"bonus": {
"selector": ["a[href*='store.php']"],
"filters": ["query.text().replace(/,/g,'').match(/.+?([\\d.]+)/)", "(query && query.length>=2)?query[1]:null"]
}
}
}
}
}
================================================
FILE: resource/sites/anthelion.me/getSearchResult.js
================================================
(function(options) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/auth_form/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
this.haveData = true;
this.authkey = "";
this.passkey = "";
}
start() {
this.getAuthKey()
.then(() => {
options.resolve(this.getResult());
})
.catch(() => {
options.reject({
success: false,
msg: options.searcher.getErrorMessage(
options.site,
ESearchResultParseStatus.parseError,
options.errorMsg
),
data: {
site: options.site,
isLogged: options.isLogged
}
});
});
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let site = options.site;
let groups = options.page.response.results;
if (groups.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
return [];
}
let results = [];
let authkey = this.authkey;
let passkey = this.passkey;
console.log("groups.length", groups.length);
try {
groups.forEach(group => {
if (group.hasOwnProperty("torrents")) {
let torrents = group.torrents;
torrents.forEach(torrent => {
let data = {
title:
group.groupName +
" [" +
group.groupYear +
"]",
subTitle:
torrent.codec +
" / " +
torrent.container +
" / " +
torrent.media +
" / " +
torrent.resolution +
" / " +
torrent.audio +
(torrent.hasLog ? ` / Log(${torrent.logScore})` : "") +
(torrent.hasCue ? " / Cue" : "") +
(torrent.remastered ? ` / ${torrent.remasterYear}` : "") +
(torrent.scene ? " / Scene" : "") +
(torrent.isFreeleech ||
torrent.isNeutralLeech ||
torrent.isPersonalFreeleech
? " / Freeleech"
: ""),
link: `${site.url}torrents.php?id=${group.groupId}&torrentid=${torrent.torrentId}`,
url: `${site.url}torrents.php?action=download&id=${torrent.torrentId}&authkey=${authkey}&torrent_pass=${passkey}`,
size: parseFloat(torrent.size),
time: torrent.time,
seeders: torrent.seeders,
leechers: torrent.leechers,
completed: torrent.snatches,
site: site,
entryName: options.entry.name,
category: group.releaseType
};
results.push(data);
});
} else {
let data = {
title: group.groupName,
link: `${site.url}torrents.php?id=${group.groupId}&torrentid=${group.torrentId}`,
url: `${site.url}torrents.php?action=download&id=${group.torrentId}&authkey=${authkey}&torrent_pass=${passkey}`,
size: parseFloat(group.size),
time: group.groupTime,
author: "",
seeders: group.seeders,
leechers: group.leechers,
completed: group.snatches,
comments: 0,
site: site,
tags: group.tags,
entryName: options.entry.name,
category: group.category
};
results.push(data);
}
});
console.log("results.length", results.length);
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
}
} catch (error) {
console.log(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack;
}
return results;
}
/**
* 获取 AuthKey ,用于组合完整的下载链接
*/
getAuthKey() {
const url = (options.site.activeURL + "/ajax.php?action=index")
.replace("://", "****")
.replace(/\/\//g, "/")
.replace("****", "://");
return new Promise((resolve, reject) => {
$.get(url)
.done(result => {
if (result && result.status === "success" && result.response) {
this.authkey = result.response.authkey;
this.passkey = result.response.passkey;
resolve();
} else {
reject();
}
})
.fail(() => {
reject();
});
});
}
}
let parser = new Parser(options);
parser.start();
})(options);
================================================
FILE: resource/sites/asiancinema.me/config.json
================================================
{
"name": "AsianCinema",
"timezoneOffset": "+0000",
"description": "综合",
"url": "https://asiancinema.me/",
"icon": "https://asiancinema.me/favicon.ico",
"tags": ["综合"],
"schema": "UNIT3D",
"host": "asiancinema.me",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "1",
"uploaded": "1TB",
"privilege": ""
},{
"level": "2",
"name": "Super User",
"interval": "2",
"uploaded": "5TB",
"privilege": ""
},{
"level": "3",
"name": "Extreme User",
"interval": "3",
"uploaded": "20TB",
"privilege": ""
},{
"level": "4",
"name": "Insane User",
"interval": "6",
"uploaded": "50TB",
"privilege": ""
},{
"level": "5",
"name": "Veteran",
"interval": "12",
"uploaded": "100TB",
"privilege": "Special freeleech"
}],
"searchEntryConfig": {
"page": "/torrents/filter",
"resultType": "html",
"parseScriptFile": "/sites/asiancinema.me/getSearchResult.js",
"resultSelector": "div.table-responsive > table:first",
"queryString": "search=$key$&qty=100",
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"queryString": "imdb=$key$&qty=100",
"replaceKey": [
"tt", ""
]
}]
}
}
================================================
FILE: resource/sites/asiancinema.me/getSearchResult.js
================================================
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
if (/\/login/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let site = options.site;
site.searchEntryConfig = options.entry
let selector =
options.resultSelector || "div.table-responsive > table:first";
let table = options.page.find(selector);
// 获取种子列表行
let rows = table.find("> tbody > tr");
if (rows.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return [];
}
let results = [];
// 获取表头
let header = table.find("> thead > tr > th");
let beginRowIndex = 0;
if (header.length == 0) {
beginRowIndex = 1;
header = rows.eq(0).find("th,td");
}
// 用于定位每个字段所列的位置
let fieldIndex = {
// 发布时间
time: -1,
// 大小
size: -1,
// 上传数量
seeders: -1,
// 下载数量
leechers: -1,
// 完成数量
completed: -1,
// 评论数量
comments: -1,
// 发布人
author: header.length - 1,
// 分类
category: 1
};
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
// 获取字段所在的列
for (let index = 0; index < header.length; index++) {
let cell = header.eq(index);
let text = cell.text();
// 评论数
if (cell.find("a[href*='comments']").length) {
fieldIndex.comments = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 发布时间
if (
cell.find("a[href*='created_at']").length ||
cell.find("i.fa-clock").length
) {
fieldIndex.time = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 大小
if (
cell.find("a[href*='size']").length ||
cell.find("i.fa-file").length
) {
fieldIndex.size = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 种子数
if (
cell.find("a[href*='seed']").length ||
cell.find("i.fa-arrow-circle-up").length
) {
fieldIndex.seeders = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 下载数
if (
cell.find("a[href*='leech']").length ||
cell.find("i.fa-arrow-circle-down").length
) {
fieldIndex.leechers = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 完成数
if (
cell.find("a[href*='complete']").length ||
cell.find("i.fa-check-square").length
) {
fieldIndex.completed = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 分类
if (cell.is(".torrents-icon")) {
fieldIndex.category = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
}
try {
// 遍历数据行
for (let index = beginRowIndex; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = row.find("a.view-torrent");
if (title.length == 0) {
continue;
}
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
// 获取下载链接
let url = "";
let downloadURL = row.find("a[href*='/download/']");
if (downloadURL.length == 0) {
downloadURL = row.find("a[href*='/download_check/']");
if (downloadURL.length > 0) {
url = downloadURL
.attr("href")
.replace("/download_check/", "/download/");
}
} else {
url = downloadURL.attr("href");
}
if (url.length == 0) {
continue;
}
if (url && url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
let data = {
title: title.text(),
subTitle: this.getSubTitle(title, row),
link,
url: url,
size:
cells
.eq(fieldIndex.size)
.text()
.trim() || 0,
time:
fieldIndex.time == -1
? ""
: cells
.eq(fieldIndex.time)
.find("span[title]")
.attr("title") ||
cells.eq(fieldIndex.time).text().replace('秒前', ' seconds ago').replace('秒前', ' seconds ago').replace('分钟前', ' minutes ago').replace('分鐘前', ' minutes ago').replace('天前', ' day ago').replace('小時前', ' hours ago').replace('小时前', ' hours ago').replace('周前', ' weeks ago').replace('个月前', ' months ago').replace('年前', ' years ago').replace('年', ' years ago')||
"",
author:
fieldIndex.author == -1
? ""
: cells.eq(fieldIndex.author).text() || "",
seeders:
fieldIndex.seeders == -1
? ""
: cells.eq(fieldIndex.seeders).text() || 0,
leechers:
fieldIndex.leechers == -1
? ""
: cells.eq(fieldIndex.leechers).text() || 0,
completed:
fieldIndex.completed == -1
? ""
: cells.eq(fieldIndex.completed).text() || 0,
comments:
fieldIndex.comments == -1
? ""
: cells.eq(fieldIndex.comments).text() || 0,
site: site,
tags: Searcher.getRowTags(site, row),
entryName: options.entry.name,
category:
fieldIndex.category == -1
? null
: this.getCategory(cells.eq(fieldIndex.category)),
progress: this.getFieldValue(row, cells, fieldIndex, "progress"),
status: this.getFieldValue(row, cells, fieldIndex, "status")
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; // `[${options.site.name}]没有搜索到相关的种子`;
}
} catch (error) {
console.log(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.stack}`;
}
return results;
}
/**
* 获取标签
* @param {*} row
* @param {*} selectors
* @return array
*/
getTags(row, selectors) {
let tags = [];
if (selectors && selectors.length > 0) {
selectors.forEach(item => {
if (item.selector) {
let result = row.find(item.selector);
if (result.length) {
tags.push({
name: item.name,
color: item.color
});
}
}
});
}
return tags;
}
/**
* 获取副标题
* @param {*} title
* @param {*} row
*/
getSubTitle(title, row) {
return "";
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: cell.find("i:first").attr("data-original-title"),
link: cell.find("a:first").attr("href")
};
if (result.name) {
result.name = result.name.replace(" torrent", "");
}
return result;
}
getFieldValue(row, cells, fieldIndex, fieldName, returnCell) {
let parent = row;
let cell = null;
if (
cells &&
fieldIndex &&
fieldIndex[fieldName] !== undefined &&
fieldIndex[fieldName] !== -1
) {
cell = cells.eq(fieldIndex[fieldName]);
parent = cell || row;
}
let result = Searcher.getFieldValue(site, parent, fieldName);
if (!result && cell) {
if (returnCell) {
return cell;
}
result = cell.text();
}
return result;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/sites/audiences.me/config.json
================================================
{
"name": "Audiences",
"timezoneOffset": "+0800",
"description": "观众",
"url": "https://audiences.me/",
"icon": "https://audiences.me/favicon.ico",
"tags": [
"综合",
"影视",
"音乐",
"电子书",
"有声书"
],
"schema": "NexusPHP",
"host": "audiences.me",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "5",
"downloaded": "120GB",
"ratio": "2.0",
"seedingPoints": "100000",
"privilege": "查看NFO文档;查看用户列表;请求续种;查看其它用户的种子历史;删除自己上传的字幕"
},{
"level": "2",
"name": "Elite User",
"interval": "15",
"downloaded": "240GB",
"ratio": "2.5",
"seedingPoints": "180000",
"privilege": "无"
},{
"level": "3",
"name": "Crazy User",
"interval": "24",
"downloaded": "400GB",
"ratio": "3.0",
"seedingPoints": "320000",
"privilege": "查看排行榜"
},{
"level": "4",
"name": "Insane User",
"interval": "40",
"downloaded": "600GB",
"ratio": "3.5",
"seedingPoints": "480000",
"privilege": "无"
},{
"level": "5",
"name": "Veteran User",
"interval": "60",
"downloaded": "900GB",
"ratio": "4.0",
"seedingPoints": "660000",
"privilege": "查看其它用户的评论、帖子历史"
},{
"level": "6",
"name": "Extreme User",
"interval": "80",
"downloaded": "2048GB",
"ratio": "4.5",
"seedingPoints": "880000",
"privilege": "永远保留账号;更新过期的外部信息"
},{
"level": "7",
"name": "Ultimate User",
"interval": "100",
"downloaded": "4096GB",
"ratio": "4.5",
"seedingPoints": "1080000",
"privilege": "无"
},{
"level": "8",
"name": "Nexus Master",
"interval": "112",
"downloaded": "8192GB",
"ratio": "5.0",
"seedingPoints": "1280000",
"privilege": "无"
}],
"collaborator": "Audiences",
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": [
"td:not(.rowfollow):not(.colhead):not(.embedded)"
],
"filters": [
"query.text()=='-'?null:query.text()"
]
},
"status": {
"selector": [
".torrents-progress", ".torrents-progress2"
],
"switchFilters": [
["query.attr('style').indexOf('100%')!=-1?2:3"],
["255"]
]
}
}
},
"searchEntry": [
{
"name": "全部",
"enabled": true
}
],
"selectors":{
"userExtendInfo": {
"merge": true,
"fields": {
"bonus": {
"selector": ["td.rowhead:contains('票根') + td", "td.rowhead:contains('爆米花') + td", "td.rowhead:contains('Karma Points') + td"],
"filters": ["query.text().replace(/,/g,'')", "parseFloat(query)"]
}
}
}
}
}
================================================
FILE: resource/sites/azusa.wiki/config.json
================================================
{
"name": "Azusa",
"description": "梓喵",
"schema": "NexusPHP",
"timezoneOffset": "+0800",
"icon": "https://azusa.wiki/favicon.ico",
"tags": ["漫画", "轻小说", "Galgame", "画集"],
"url": "https://azusa.wiki",
"host": "azusa.wiki",
"collaborator": "zhuweitung",
"formerHosts": [
"www.azusa.wiki"
],
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"uploads": "1",
"downloaded": "50GB",
"ratio": "1",
"seedingPoints": "40000",
"privilege": "得到一个邀请名额;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"uploads": "10",
"downloaded": "100GB",
"ratio": "2",
"seedingPoints": "100000",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"uploads": "20",
"downloaded": "150GB",
"ratio": "3",
"seedingPoints": "300000",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"uploads": "40",
"downloaded": "200GB",
"ratio": "4",
"seedingPoints": "500000",
"privilege": "可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "40",
"uploads": "80",
"downloaded": "250GB",
"ratio": "5",
"seedingPoints": "1000000",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "60",
"uploads": "150",
"downloaded": "300GB",
"ratio": "6",
"seedingPoints": "1500000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "80",
"uploads": "150",
"downloaded": "350GB",
"ratio": "7",
"seedingPoints": "2000000",
"privilege": "得到五个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "100",
"uploads": "300",
"downloaded": "400GB",
"ratio": "8",
"seedingPoints": "5000000",
"privilege": "得到十个邀请名额。"
}
],
"selectors": {
"userBaseInfo": {
"merge": true,
"fields": {
"name": {
"selector": ["a[href*='userdetails.php'][class*='Name']:first"],
"filters": ["query ? query.find('i.icon-rank:first').length > 0 ? $(query.find('i.icon-rank:first')[0].previousSibling).text() : query.text() : ''"]
}
}
},
"userSeedingTorrents": {
"merge": true,
"fields": {
"seeding": {
"selector": ["b:first"],
"filters": ["query.text().trim()"]
},
"seedingSize": {
"selector": ["b:first"],
"filters": ["$(query[0].nextSibling).text().trim().match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length==2)?(query[0]).sizeToNumber():0"]
}
}
},
"userUploadedTorrents": {
"prerequisites": "!user.uploads",
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=uploaded",
"fields": {
"uploads": {
"selector": ["b:first"],
"filters": ["query.text().trim()"]
}
}
}
},
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(0) > div:last"],
"filters": ["query ? parseFloat(query.attr('title').match(/[\\d.]+/)) : null"]
},
"status": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(0) > div:last"],
"filters": [
"query ? query.attr('title') : ''",
"query.indexOf('seeding') != -1 ? 2 : query.indexOf('leeching') != -1 ? 1 : query.indexOf('100%') != -1 ? 255 : 3"
]
}
}
}
}
================================================
FILE: resource/sites/baconbits.org/config.json
================================================
{
"name": "bB",
"timezoneOffset": "+0000",
"description": "",
"url": "https://baconbits.org/",
"icon": "https://baconbits.org/favicon.ico",
"tags": ["综合"],
"schema": "",
"host": "baconbits.org",
"supportedFeatures": {
"userData": true,
"search": false,
"imdbSearch": false,
"sendTorrent": false
},
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": [".username"],
"attribute": "href",
"filters": ["query ? query.getQueryString('id'):''"]
},
"name": {
"selector": [".username"]
},
"isLogged": {
"selector": ["a[href*='logout.php']"],
"filters": ["query.length>0"]
}
}
},
"userExtendInfo": {
"page": "/user.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": ["li:contains('Uploaded:') > span"],
"filters": ["query.attr('title').replace(/,/g,'').sizeToNumber()"]
},
"downloaded": {
"selector": ["li:contains('Downloaded:') > span"],
"filters": ["query.attr('title').replace(/,/g,'').sizeToNumber()"]
},
"ratio": {
"selector": ["li:contains('Ratio:') > span"],
"filters": ["query.attr('title').replace(/,/g,'')"]
},
"seeding": {
"selector": ["li:contains('Seeding:')"],
"filters": [
"query.text().trim().replace(/,|\\n/g,'').match(/:.+?([\\d.]+)/)",
"(query && query.length>=2)?parseFloat(query[1]):null"
]
},
"seedingSize": {
"value": -1
},
"levelName": {
"selector": ["li:contains('Class:')"],
"filters": ["query.text().match(/Class:(.+)/)", "(query && query.length>=2)?query[1]:''"]
},
"bonus": {
"selector": ["li:contains('Bonus Points:') > a"],
"filters": ["query.text().replace(/,|\\n|\\s+/g,'')"]
},
"joinTime": {
"selector": ["li:contains('Joined:') > span"],
"filters": [
"query.attr('title')",
"dateTime(query).isValid()?dateTime(query).valueOf():query"
]
}
}
}
}
}
================================================
FILE: resource/sites/bemaniso.ws/config.json
================================================
{
"name": "Bemaniso",
"timezoneOffset": "+0000",
"description": "Game,music",
"url": "https://bemaniso.ws/",
"icon": "https://bemaniso.ws/favicon.ico",
"tags": ["Game","Music","sims"],
"schema": "GazelleJSONAPI",
"host": "bemaniso.ws",
"collaborator": "ted423",
"searchEntryConfig": {
"skipIMDbId": true
},
"searchEntry": [{
"name": "all",
"enabled": true
}
],
"supportedFeatures": {
"imdbSearch": false,
"userData": "◐"
}
}
================================================
FILE: resource/sites/beyond-hd.me/config.json
================================================
{
"name": "BeyondHD",
"timezoneOffset": "+0000",
"description": "Beyond Your Imagination,BeyondHD is a community-built Movie/TV database. Every piece of data has been added by our amazing community since 2012. BeyondHD is blessed to have a proactive userbase that focuses on HD content, an awesome/secure codebase and a helpful and friendly volunteer Staff team.",
"url": "https://beyond-hd.me/",
"icon": "https://beyond-hd.me/favicon.ico",
"tags": ["影视"],
"schema": "UNIT3D",
"host": "beyond-hd.me",
"collaborator": "lengmianxia",
"plugins": [{
"name": "个人种子列表页面",
"pages": ["^/.*?/(uploads|downloads|seeds|active|torrents|unsatisfieds)"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/UNIT3D/torrents.js"]
}],
"searchEntryConfig": {
"page": "/torrents",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "div.table-torrents > table:last",
"queryString": "search=$key$&qty=100",
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"queryString": "imdb=$key$&qty=100"
}],
"fieldSelector": {
"progress": {
"selector": ["i.fal.fa-seedling, i.fal.fa-check[title='Snatched']"],
"filters": ["query.attr('title')?100:null"]
},
"status": {
"selector": ["i.fal.fa-seedling", "i.fal.fa-check[title='Snatched']"],
"switchFilters": [
["2"],
["255"]
]
}
}
},
"searchEntry": [{
"name": "全部",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": ".fas.fa-star[title*='100%']"
}, {
"name": "25%",
"selector": ".fas.fa-star[title*='25%']"
}, {
"name": "50%",
"selector": ".fas.fa-star[title*='50%']"
}, {
"name": "75%",
"selector": ".fas.fa-star[title*='75%']"
}],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"id": {
"selector": ["div.dropmenu > a[href]:first"],
"attribute": "href",
"switchFilters": [
["query.match(/me\\/(.+)\\.(.+)/)", "(query && query.length>=3)?(query[2]):''"],
["query ? query.getQueryString('id'):''"]
]
},
"name": {
"selector": ["div.dropmenu > a[href]:first"],
"attribute": "href",
"switchFilters": [
["query.match(/me\\/(.+)\\.(.+)/)", "(query && query.length>=3)?(query[1]):''"],
["query ? query.getQueryString('id'):''"]
]
},
"uploaded": {
"selector": ["a[href*='uploads']:first"],
"filters": ["query.parent().text().trim().replace(/,|\\n|\\s+/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["a[href*='downloads']:first"],
"filters": ["query.parent().text().trim().replace(/,|\\n|\\s+/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"bonus": {
"selector": ["a[href*='bonus']:first"],
"filters": ["query.parent().text().trim().replace(/,|\\n|\\s+/g,'').replace(/BP:/g,'')"]
},
"seeding": {
"selector": ["#beta-stats i.fa-seedling"],
"filters": ["query.parent().text().trim()"]
},
"messageCount": {
"selector": [".beta-alert:not([title='Bets']) .notify"],
"filters": ["query[0]?11:0"]
}
}
},
"userExtendInfo": {
"page": "/$user.name$.$user.id$",
"fields": {
"seedingSize": {
"selector": ["td:contains('Active Seed Size') + td"],
"filters": ["query.text().trim().replace(/,/g,'').sizeToNumber()"]
},
"levelName": {
"selector": "div.button-holder span.badge-faded"
},
"joinTime": {
"selector": "div.button-holder h5:contains('Since: ')",
"filters": ["query.text().trim().replace('Since: ', '').replace('Member ', '')", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
},
"unsatisfiedsPage": {
"selector": ["a[href$='/unsatisfieds']:first"],
"attribute": "href",
"filters": ["query ? new URL(query).pathname : null"]
}
}
},
"bonusExtendInfo": {
"prerequisites": "!user.bonusPerHour",
"page": "/$user.name$.$user.id$/bonus",
"fields": {
"bonusPerHour": {
"selector": ["div.panel-body > div.hd-table > div:first > div:first"],
"filters": ["parseFloat(query.text())"]
}
}
},
"hnrExtendInfo": {
"prerequisites": "!(!user.unsatisfiedsPage)",
"page": "$user.unsatisfiedsPage$",
"fields": {
"unsatisfieds": {
"selector": ["ul.pagination","tr[class='userFiltered'][hr='0'][immune='0']"],
"filters": ["query.find('li > a:not([rel])').length > 0 ? query.find('li > a:not([rel])').last().text() * 50 + '+' : query.has('a[href*=\"download\"]').length"]
}
}
},
"common": {
"page": "/torrent/",
"merge": true,
"fields": {
"downloadURL": {
"selector": ["a.bhd-toolx-button[href*='/download/']"],
"filters": ["query.attr('href')"]
},
"sayThanksButton": {
"selector": ["div.torrentthankbuttons[title*='Thank']"],
"filters": ["query"]
}
}
}
}
}
================================================
FILE: resource/sites/beyond-hd.me/getSearchResult.js
================================================
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
if (/\/login/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let site = options.site;
let selector =
options.resultSelector || "div.table-torrents > table:first";
let table = options.page.find(selector);
// 获取种子列表行
let rows = table.find("> tbody > tr");
if (rows.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty;
return [];
}
let results = [];
// 获取表头
let header = table.find("> thead > tr > th");
let beginRowIndex = 0;
if (header.length == 0) {
beginRowIndex = 1;
header = rows.eq(0).find("th,td");
}
// 用于定位每个字段所列的位置
let fieldIndex = {
// 发布时间
time: -1,
// 大小
size: -1,
// 上传数量
seeders: -1,
// 下载数量
leechers: -1,
// 完成数量
completed: -1,
// 评论数量
comments: -1,
// 发布人
author: header.length - 1,
// 分类
category: 1,
progress: 11,
status: 11
};
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
// 获取字段所在的列
for (let index = 0; index < header.length; index++) {
let cell = header.eq(index);
let text = cell.text();
// 评论数
if (cell.find("a[href*='comments']").length) {
fieldIndex.comments = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 发布时间
if (
cell.find("a[href*='created_at']").length ||
cell.find("i.fa-clock").length
) {
fieldIndex.time = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 大小
if (
cell.find("a[href*='size']").length ||
cell.find("i.fa-file").length
) {
fieldIndex.size = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 种子数
if (
cell.find("a[href*='seed']").length ||
cell.find("i.fa-arrow-circle-up").length
) {
fieldIndex.seeders = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 下载数
if (
cell.find("a[href*='leech']").length ||
cell.find("i.fa-arrow-circle-down").length
) {
fieldIndex.leechers = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 完成数
if (
cell.find("a[href*='complete']").length ||
cell.find("i.fa-check-square").length
) {
fieldIndex.completed = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 分类
if (cell.is(".torrents-icon")) {
fieldIndex.category = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
}
try {
// 遍历数据行
for (let index = beginRowIndex; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = row.find("a.torrent-name");
if (title.length == 0) {
continue;
}
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
// 获取下载链接
let url = row.find("a[href*='/download/']").attr("href");
if (url.length == 0) {
continue;
}
if (url && url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
let data = {
title: title.text().trim(),
subTitle: this.getSubTitle(title, row).trim(),
link,
url: url,
size:
cells
.eq(fieldIndex.size)
.text()
.trim() || 0,
time:
fieldIndex.time == -1
? ""
: cells
.eq(fieldIndex.time)
.find("span[title]")
.attr("title") ||
cells.eq(fieldIndex.time).text().trim() ||
"",
author:
fieldIndex.author == -1
? ""
: cells.eq(fieldIndex.author).text().trim() || "",
seeders:
fieldIndex.seeders == -1
? ""
: cells.eq(fieldIndex.seeders).text().trim() || 0,
leechers:
fieldIndex.leechers == -1
? ""
: cells.eq(fieldIndex.leechers).text().trim() || 0,
completed:
fieldIndex.completed == -1
? ""
: cells.eq(fieldIndex.completed).text().trim() || 0,
comments:
fieldIndex.comments == -1
? ""
: cells.eq(fieldIndex.comments).text().trim() || 0,
site: site,
tags: Searcher.getRowTags(site, row),
entryName: options.entry.name,
category:
fieldIndex.category == -1
? null
: this.getCategory(cells.eq(fieldIndex.category)),
progress: this.getFieldValue(row, cells, fieldIndex, "progress"),
status: this.getFieldValue(row, cells, fieldIndex, "status")
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
}
} catch (error) {
console.log(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack;
}
return results;
}
/**
* 获取副标题
* @param {*} title
* @param {*} row
*/
getSubTitle(title, row) {
return "";
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: cell.find("i:first").attr("data-original-title"),
link: cell.find("a:first").attr("href")
};
if (result.name) {
result.name = result.name.replace(" torrent", "");
}
return result;
}
getFieldValue(row, cells, fieldIndex, fieldName, returnCell) {
let parent = row;
let cell = null;
if (
cells &&
fieldIndex &&
fieldIndex[fieldName] !== undefined &&
fieldIndex[fieldName] !== -1
) {
cell = cells.eq(fieldIndex[fieldName]);
parent = cell || row;
}
let result = Searcher.getFieldValue(site, parent, fieldName);
if (!result && cell) {
if (returnCell) {
return cell;
}
result = cell.text().trim();
}
if(result == "")return null;
return result;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/sites/bibliotik.me/config.json
================================================
{
"name": "Bibliotik",
"timezoneOffset": "+0000",
"description": "Bibliotik",
"url": "https://bibliotik.me/",
"icon": "https://bibliotik.me/favicon.ico",
"tags": ["电子书"],
"schema": "Common",
"host": "bibliotik.me",
"plugins": [{
"name": "种子详情页面",
"pages": ["^/torrents/(\\d+)$"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/details.js"]
}, {
"name": "种子列表",
"pages": ["^/torrents/$"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/torrents.js"]
}],
"searchEntryConfig": {
"page": "/torrents/",
"resultType": "html",
"queryString": "search=$key$&y1=&y2=&p1=&p2=&d1=&d2=&size1=&size2=&retail=any&freeleech=any&img=&my=&bm=&sd=&lch=&sn=&ad1=&ad2=&orderby=added&order=desc",
"parseScriptFile": "/schemas/Common/getSearchResult.js",
"resultSelector": "table#torrents_table:first",
"skipIMDbId": true,
"firstDataRowIndex": 1,
"fieldIndex": {
"title": 1,
"time": 4,
"size": 4,
"seeders": 7,
"leechers": 8,
"completed": 6,
"comments": 5,
"author": 9,
"category": 1,
"url": 2,
"link": 1
},
"loggedRegex": "logout\\?authkey=",
"fieldSelector": {
"title": {
"selector": ["span.title a:first"]
},
"url": {
"selector": ["a:first"],
"filters": ["query.attr('href')"]
},
"link": {
"selector": ["span.title a:first"],
"filters": ["query.attr('href')"]
},
"time": {
"selector": ["time"],
"filters": ["query.attr('datetime')"]
},
"category": {
"selector": ["span.torFormat"],
"filters": ["query.text()"]
},
"size": {
"selector": [""],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)[1]"]
}
}
},
"searchEntry": [{
"name": "all",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "td:contains('[100% free!]')"
}],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"id": {
"selector": ["#pre_header_status a[href*='/users/']"],
"attribute": "href",
"filters": ["query ? query.match(/(\\d+)/)[1]: ''"]
},
"name": {
"selector": ["#pre_header_status a[href*='/users/']"]
},
"isLogged": {
"selector": ["a[href*='logout?authkey']"],
"filters": ["query.length>0"]
}
}
},
"userExtendInfo": {
"page": "/users/$user.id$",
"fields": {
"uploaded": {
"selector": ["#pre_header_status li:contains('Up: ')"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["#pre_header_status li:contains('Down: ')"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"levelName": {
"selector": ["#detailsbox p:contains('Class: ')"],
"filters": ["query.text().replace(/Class: /g,'')"]
},
"joinTime": {
"selector": "#detailsbox p:contains('Joined ') time",
"filters": ["query.attr('datetime')", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
},
"bonus": {
"value": "N/A"
}
}
},
"common": {
"fields": {
"size": {
"selector": ["p#details_file_info"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"]
},
"downloadURL": {
"selector": ["a[href*='/download']"],
"filters": ["query.attr('href')"]
},
"downloadURLs": {
"selector": ["a[href*='/download']"],
"filters": ["query.toArray()"]
},
"confirmSize": {
"selector": ["table#torrents_table:first"],
"filters": ["query.find('td.t_files_size_added')"]
}
}
},
"userSeedingTorrents": {
"page": "/users/$user.id$/seeding",
"parser": "getUserSeedingTorrents.js",
"fields": {
"seeding": {
"selector": ["table#torrents_table:first tbody > tr"],
"filters": ["query.length"]
},
"seedingSize": {
"selector": ["table#torrents_table:first tbody > tr"],
"filters": ["jQuery.map(query.find('td.t_files_size_added'), (item)=>{return $(item).text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)[1];})", "_self.getTotalSize(query)"]
}
}
}
}
}
================================================
FILE: resource/sites/bibliotik.me/getUserSeedingTorrents.js
================================================
(function(options, User) {
class Parser {
constructor(options, dataURL) {
this.options = options;
this.dataURL = dataURL;
this.body = null;
this.rawData = "";
this.pageInfo = {
count: 0,
current: 0
};
this.result = {
seeding: 0,
seedingSize: 0
};
this.load();
}
/**
* 完成
*/
done() {
this.options.resolve(this.result);
}
/**
* 解析内容
*/
parse() {
const doc = new DOMParser().parseFromString(this.rawData, "text/html");
// 构造 jQuery 对象
this.body = $(doc).find("body");
this.getPageInfo();
let results = new User.InfoParser(User.service).getResult(
this.body,
this.options.rule
);
if (results) {
this.result.seeding += results.seeding;
this.result.seedingSize += results.seedingSize;
}
// 是否已到最后一页
if (this.pageInfo.current < this.pageInfo.count) {
this.pageInfo.current++;
this.load();
} else {
this.done();
}
}
/**
* 获取页面相关内容
*/
getPageInfo() {
if (this.pageInfo.count > 0) {
return;
}
// 获取最大页码
const infos = this.body
.find(".pagination a[href*='?page']:contains('Last >>'):first")
.attr("href");
if (infos) {
this.pageInfo.count = parseInt(infos.getQueryString("page"));
} else {
this.pageInfo.count = 1;
}
}
/**
* 加载当前页内容
*/
load() {
let url = this.dataURL;
if (this.pageInfo.current > 0) {
url += "?page=" + this.pageInfo.current;
}
$.get(url)
.done(result => {
this.rawData = result;
this.parse();
})
.fail(() => {
this.done();
});
}
}
let dataURL = options.site.activeURL + options.rule.page;
dataURL = dataURL
.replace("$user.id$", options.userInfo.id)
.replace("$user.name$", options.userInfo.name)
.replace("://", "****")
.replace(/\/\//g, "/")
.replace("****", "://");
new Parser(options, dataURL);
})(_options, _self);
/**
*
_options 表示当前参数
{
site,
rule,
userInfo,
resolve,
reject
}
_self 表示 User(/src/background/user.ts) 类实例
*/
================================================
FILE: resource/sites/bitbr/config.json
================================================
{
"name": "bitbr",
"timezoneOffset": "+0800",
"schema": "NexusPHP",
"url": "https://bitbr.cc/",
"icon": "https://bitbr.cc/favicon.ico",
"tags": [
"综合",
"成人"
],
"host": "bitbr.cc",
"collaborator": "枕头啊枕头",
"selectors": {
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"merge": true,
"fields": {
"uploaded": {
"selector": "span.medium",
"filters": [
"query.text().match(/Uploaded: (.*?) Downloaded/g)[0].replace('Uploaded:', '').replace('Downloaded', '').trim()",
"(query && query.length>=2) ? query.sizeToNumber() : 0"
]
},
"downloaded": {
"selector": "span.medium",
"filters": [
"query.text().match(/Downloaded: (.*?) Torrents/g)[0].replace('Downloaded:', '').replace('Torrents', '').trim()",
"(query && query.length>=2) ? query.sizeToNumber() : 0"
]
},
"ratio": {
"selector": "span.medium",
"filters": [
"query.text().match(/Ratio:(.*?) Uploaded:/g)[0].replace('Ratio:','').replace('Uploaded:','').replace(/,/gi,'').trim()",
"(query && query.length>=2) ? query : 0"
]
},
"levelName": {
"selector": "table.main tbody tbody td:contains(Classe)",
"filters": [
"query.parent().children('td').eq(1).find('img').attr('title')"
]
},
"bonus": {
"selector": [
"table.main tbody tbody td:contains(Pontos Karma)"
],
"filters": [
"query.parent().children('td').eq(1).text()",
"parseFloat(query)"
]
},
"joinTime": {
"selector": "table.main tbody tbody tr:eq(2) td:eq(1)",
"filters": [
"query.text().match(/\\d{4}-\\d{1,2}-\\d{1,2} \\d{2}:\\d{1,2}:\\d{1,2}/g)[0]",
"dateTime(query).isValid()?dateTime(query).valueOf():query"
]
}
}
},
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/registro(.*?)Tipo/g)",
"(query && query.length>0 ) ? query[0].replace('registro', '').replace('Tipo', '').replace('s', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
},
"seeding": {
"selector": "",
"filters": [
"query.text().match(/(.*?)registro/g)",
"(query && query.length>0 ) ? query[0].replace('registro', '').trim() : 0",
"(query != 0) ? query : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/bitpt.cn/config.json
================================================
{
"name": "极速之星PT",
"description": "极速之星IPV6资源交流平台",
"url": "https://bitpt.cn/",
"icon": "https://bitpt.cn/favicon.ico",
"tags": [
"教育网",
"综合",
"影视"
],
"schema": "NexusPHP",
"host": "bitpt.cn",
"collaborator": "wanicca",
"plugins": [{
"name": "种子详情页面",
"pages": ["/bbs"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["/browse.php"],
"scripts": ["/schemas/NexusPHP/common.js", "torrents.js"]
}],
"searchEntryConfig": {
"page": "/browse.php",
"queryString": "s=$key$",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "table.torrenttable:last",
"fieldIndex": {
"title": 1,
"subTitle": 1,
"url": 1,
"link":1,
"size":3,
"seeders": 4,
"leechers": 5,
"completed": 6,
"author": 7,
"category": 0,
"time":7
}
},
"searchEntry": [
{
"name": "全部",
"enabled": true
},
{
"queryString": "c=1000",
"name": "Movie",
"enabled": false
}
],
"categories": [
{
"entry": "browse.php?",
"result": "c=$id$",
"category": [
{
"id": 1000,
"name": "Movie"
}
]
}
],
"torrentTagSelectors": [
{
"name": "Free",
"selector": "a[title^='该资源不计下载流量']"
},
{
"name": "30%",
"selector": "a[title^='该资源计50%流量']"
},
{
"name": "50%",
"selector": "a[title^='该资源计30%流量']"
}
],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": "a[href*='userdetails.php']:first",
"attribute": "href",
"filters": [
"query ? query.getQueryString('uid'):''"
]
},
"name": {
"selector": "a[href*='userdetails.php']:first"
},
"isLogged": {
"selector": [
"a[href*='logout.php']"
],
"filters": [
"query.length>0"
]
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?uid=$user.id$",
"fields": {
"uploaded": {
"selector": [
"td:contains('上传流量') + td"
],
"filters": [
"query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
]
},
"downloaded": {
"selector": [
"td:contains('下载流量') + td"
],
"filters": [
"query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
]
},
"ratio": {
"selector": "td:contains('共享率') + td",
"filters": [
"parseFloat(query.text())"
]
},
"levelName": {
"selector": [
"td:contains('用户级别') + td"
]
},
"bonus": {
"selector": [
"td:contains('星辰') + td"
],
"filters": [
"query.text().replace(/,/g,'').match(/([\\d.]+)/)",
"(query && query.length>=2)?query[1]:''"
]
},
"joinTime": {
"selector": [
"td:contains('注册时间') + td"
],
"filters": [
"query.text().split(' (')[0]",
"dateTime(query).isValid()?dateTime(query).valueOf():query"
]
},
"seeding": {
"selector": [
"a:contains('当前上传的种子')"
],
"filters": [
"query.text().match(/([\\d.]+)个/)",
"(query && query.length>=1)?query[1]:''"
]
},
"seedingSize": {
"selector": [
"a:contains('当前上传的种子')"
],
"filters": [
"query.text().replace(/,/g,'').match(/共([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
]
}
}
}
}
}
================================================
FILE: resource/sites/bitpt.cn/details.js
================================================
(function ($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
if (this.getDownloadURL()) {
this.initDetailButtons();
}
}
/**
* 获取下载链接
*/
getDownloadURL() {
let query = $("a[href*='download.php']");
let url = "";
if (query.length > 0) {
url = query.attr("href");
}
if (!url) {
return "";
}
if (url.substr(0, 2) === '//') {
url = `${location.protocol}${url}`;
} else if (url.substr(0, 1) === "/") {
url = `${location.origin}${url}`;
} else if (url.substr(0, 4) !== "http") {
url = `${location.origin}/${url}`;
}
if (url.indexOf("ssl=yes") === -1) {
url += "&ssl=yes"
}
return url;
}
/**
* 获取当前种子标题
*/
getTitle() {
let title = $("span#thread_subject").text();
let datas = /\"(.*?)\"/.exec(title);
if (datas && datas.length > 1) {
return datas[1] || title;
}
return title;
}
};
(new App()).init();
})(jQuery, window);
================================================
FILE: resource/sites/bitpt.cn/getSearchResult.js
================================================
/**
* 通用搜索解析脚本
*/
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
// 判断是否已登录
if (
options.entry.loggedRegex &&
!new RegExp(options.entry.loggedRegex, "").test(options.responseText)
) {
// 需要登录后再搜索
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
this.haveData = true;
this.site = options.site;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let selector = options.resultSelector;
let dataRowSelector = options.entry.dataRowSelector || "> tbody > tr";
selector = selector.replace(dataRowSelector, "");
// 获取数据表格
let table = options.page.find(selector);
console.log(table)
// 获取种子列表行
let rows = table.find(dataRowSelector);
if (rows.length == 0) {
// 没有定位到种子列表,或没有相关的种子
options.status = ESearchResultParseStatus.torrentTableIsEmpty;
return [];
}
let subcats = options.page.find("div#subcat")
let results = [];
let beginRowIndex = options.entry.firstDataRowIndex || 0;
// 用于定位每个字段所列的位置
let fieldIndex = options.entry.fieldIndex || {
// 发布时间
time: -1,
// 大小
size: -1,
// 上传数量
seeders: -1,
// 下载数量
leechers: -1,
// 完成数量
completed: -1,
// 评论数量
comments: -1,
// 发布人
author: -1,
// 分类
category: -1
};
try {
// 遍历数据行
for (let index = beginRowIndex; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
// let title = this.getTitle(row, cells, fieldIndex);
let title_entry = cells.eq(fieldIndex['title']).find("a[href^='details']")
let title = title_entry.text()
// 没有获取标题时,继续下一个
if (!title) {
continue;
}
// let link = this.getFieldValue(row, cells, fieldIndex, "link");
let link = title_entry.attr('href')
// 获取下载链接
// let url = this.getFieldValue(row, cells, fieldIndex, "url");
let url = cells.eq(fieldIndex['url']).find("a[title^='下载种子']").attr('href')
if (!url || !link) {
continue;
}
let data = {
title: title,
// subTitle: this.getFieldValue(row, cells, fieldIndex, "subTitle"),
subTitle: cells.eq(fieldIndex['subTitle']).find(">div:last>table>tbody>tr>td>span").text(),
link: this.getFullURL(link),
url: this.getFullURL(url),
size: this.getFieldValue(row, cells, fieldIndex, "size")+"B" || 0,
// time: this.getFieldValue(row, cells, fieldIndex, "time"),
time: cells.eq(fieldIndex['time']).find("p.add_t").text(),
author: this.getFieldValue(row, cells, fieldIndex, "author") || "", //尚未解决
seeders: this.getFieldValue(row, cells, fieldIndex, "seeders") || 0,
leechers:
this.getFieldValue(row, cells, fieldIndex, "leechers") || 0,
completed:
this.getFieldValue(row, cells, fieldIndex, "completed") || 0,
comments:
this.getFieldValue(row, cells, fieldIndex, "comments") || 0,
site: this.site,
tags: Searcher.getRowTags(this.site, row),
entryName: options.entry.name,
// category: this.getFieldValue(row, cells, fieldIndex, "category"),
category:subcats.find("a[href='"+cells.eq(fieldIndex['category']).find("a[href^='browse']").attr('href').match(/(\?c=\d+)/)[1]+"']").text(),
progress: this.getFieldValue(row, cells, fieldIndex, "progress"),
status: this.getFieldValue(row, cells, fieldIndex, "status")
};
results.push(data);
}
} catch (error) {
// 获取种子信息出错
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack;
}
// 没有搜索到相关的种子
if (results.length == 0 && !options.errorMsg) {
options.status = ESearchResultParseStatus.noTorrents;
}
return results;
}
/**
* 获取指定字段内容
* @param {*} row
* @param {*} cells
* @param {*} fieldIndex
* @param {*} fieldName
*/
getFieldValue(row, cells, fieldIndex, fieldName, returnCell) {
let parent = row;
let cell = null;
if (
cells &&
fieldIndex &&
fieldIndex[fieldName] !== undefined &&
fieldIndex[fieldName] !== -1
) {
cell = cells.eq(fieldIndex[fieldName]);
parent = cell || row;
}
let result = Searcher.getFieldValue(this.site, parent, fieldName);
if (!result && cell) {
if (returnCell) {
return cell;
}
result = cell.text();
}
return result;
}
/**
* 获取完整的URL地址
* @param {string} url
*/
getFullURL(url) {
let URL = PTServiceFilters.parseURL(this.site.url);
if (url.substr(0, 2) === "//") {
url = `${URL.protocol}${url}`;
} else if (url.substr(0, 1) === "/") {
url = `${URL.origin}${url}`;
} else if (url.substr(0, 4) !== "http") {
url = `${URL.origin}/${url}`;
}
return url;
}
/**
* 获取标题
*/
getTitle(row, cells, fieldIndex) {
let title = this.getFieldValue(row, cells, fieldIndex, "title", true);
if (!title) {
return "";
}
if (typeof title === "string") {
return title;
}
// 对title进行处理,防止出现cf的email protect
let cfemail = title.find("span.__cf_email__");
if (cfemail.length > 0) {
cfemail.each((index, el) => {
$(el).replaceWith(Searcher.cfDecodeEmail($(el).data("cfemail")));
});
}
return title.text();
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/sites/bitpt.cn/torrents.js
================================================
(function($) {
console.log("this is torrent.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $("a[href*='download.php'][href*='ssl=yes']").toArray();
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (links.length == 0) {
return this.t("getDownloadURLsFailed"); //"获取下载链接失败,未能正确定位到链接";
}
let urls = $.map(links, item => {
let url =
$(item).attr("href") ;
if (url) {
if (url.substr(0, 1) === "/") {
url = url.substr(1);
}
url = siteURL + url;
}
return url;
});
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$(".torrents").find(
"td:contains('MB'),td:contains('GB'),td:contains('TB')"
)
);
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/blutopia.cc/config.json
================================================
{
"name": "Blutopia",
"timezoneOffset": "+0000",
"schema": "UNIT3D",
"url": "https://blutopia.cc/",
"icon": "https://blutopia.cc/favicon.ico",
"tags": ["影视", "综合"],
"host": "blutopia.cc",
"formerHosts": [
"blutopia.xyz"
],
"levelRequirements": [{
"level": "1",
"name": "BluUser",
"interval": "1",
"uploaded": "1TiB",
"privilege": "5 download slots"
},{
"level": "2",
"name": "BluMaster",
"interval": "2",
"uploaded": "5TiB",
"privilege": "10 download slots"
},{
"level": "3",
"name": "BluExtremist",
"interval": "3",
"uploaded": "20TiB",
"privilege": "Automatic torrent approvals; Invite forums; 15 download slots"
},{
"level": "4",
"name": "BluLegend",
"interval": "6",
"uploaded": "50TiB",
"privilege": "20 download slots"
},{
"level": "5",
"name": "Blutopian",
"interval": "12",
"uploaded": "100TiB",
"privilege": "Immunity to automated HnR warnings; Global Freeleech; 25 download slots"
}],
"collaborator": ["bimzcy", "lengmianxia", "bright"],
"selectors": {
"hnrExtendInfo": {
"page": "/users/$user.name$/torrents?unsatisfied=include&perPage=100&hitrun=exclude&immune=exclude",
"fields": {
"unsatisfieds": {
"selector": [".table-responsive tbody tr"],
"filters": ["query ? query.length : 0"]
}
}
}
},
"cdn": ["https://blutopia.cc/","https://blutopia.xyz/"]
}
================================================
FILE: resource/sites/broadcasthe.net/config.json
================================================
{
"name": "BTN",
"timezoneOffset": "+0800",
"description": "著名剧集站点,又被戏称为鼻涕妞",
"url": "https://broadcasthe.net/",
"icon": "https://broadcasthe.net/favicon.ico",
"tags": ["剧集"],
"schema": "Gazelle",
"host": "broadcasthe.net",
"collaborator": ["ylxb2016", "enigmaz"],
"searchEntryConfig": {
"page": "/torrents.php",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"queryString": "searchstr=$key$"
},
"searchEntry": [{
"name": "all",
"enabled": true
},
{
"queryString": "filter_cat[1]=1",
"name": "Episode",
"enabled": false
},
{
"queryString": "filter_cat[2]=1",
"name": "Season",
"enabled": false
}
],
"categories": [{
"entry": "*",
"result": "&filter_cat[$id$]=1",
"category": [{
"id": 1,
"name": "Episode"
},
{
"id": 2,
"name": "Season"
}
]
}],
"selectors": {
"userExtendInfo": {
"page": "/user.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": "#section2 > div > div.statistics > div:nth-child(3) > ul > li:nth-child(1)",
"filters": [
"query.text().replace(/,/g,'').match(/Upload.+?([\\d.]+ ?[TGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():null"
]
},
"downloaded": {
"selector": "#section2 > div > div.statistics > div:nth-child(3) > ul > li:nth-child(7)",
"filters": [
"query.text().replace(/,/g,'').match(/Downloaded.+?([\\d.]+ ?[TGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():null"
]
},
"ratio": {
"value": null
},
"levelName": {
"selector": "#section2 > div > div.statistics > div:nth-child(1) > ul > li:nth-child(2)",
"filters": [
"query.text().match(/Class:.+?(.+)/)",
"(query && query.length>=2)?query[1]:''"
]
},
"bonus": {
"selector": "#section2 > div > div.statistics > div:nth-child(1) > ul > li:nth-child(5) > a",
"filters": [
"query.text().replace(/,/g,'')"
]
},
"joinTime": {
"selector": "#section2 > div > div.statistics > div:nth-child(1) > ul > li:nth-child(1) > span",
"filters": [
"query.attr('title')||query.text()",
"dateTime(query).isValid()?dateTime(query).valueOf():query"
]
},
"seeding": {
"selector": "#section2 > div > div.statistics > div:nth-child(3) > ul > li:nth-child(4)",
"filters": [
"query.text().replace(/,/g,'').match(/Seeding:.+?(\\d+).+?/)",
"(query && query.length>=2)?(query[1]):null"
]
},
"seedingSize": {
"selector": "#section2 > div > div.statistics > div:nth-child(3) > ul > li:nth-child(5)",
"filters": [
"query.text().replace(/,/g,'').match(/Seeding Size:.+?([\\d.]+ ?[TGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
]
}
}
},
"userSeedingTorrents": {
"page": "/bonus.php?action=rate",
"fields": {
"seedingList": {
"selector": ["a[href*='torrentid=']"],
"filters": ["jQuery.map(query, item=>$(item).attr('href').match(/torrentid=(\\d+)/)[1])"]
}
}
}
},
"supportedFeatures": {
"imdbSearch": false
}
}
================================================
FILE: resource/sites/broadcasthe.net/getSearchResult.js
================================================
(function(options) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/auth_form/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
if (
/没有种子|No [Tt]orrents?|Your search did not match anything|用准确的关键字重试/.test(
options.responseText
)
) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
let site = options.site;
let results = [];
// 获取种子列表行
let rows = options.page.find(
options.resultSelector || "table.torrent_table:last > tbody > tr"
);
if (rows.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return results;
}
// 获取表头
let header = rows.eq(0).find("th,td");
// 用于定位每个字段所列的位置
let fieldIndex = {
time: -1,
size: -1,
seeders: -1,
leechers: -1,
completed: -1,
comments: -1,
author: -1
};
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
// 获取字段所在的列
for (let index = 0; index < header.length; index++) {
const cell = header.eq(index);
// 大小
if (cell.find("a[href*='order_by=size']").length) {
fieldIndex.size = index;
continue;
}
// 种子数
if (cell.find("a[href*='order_by=seeders']").length) {
fieldIndex.seeders = index;
continue;
}
// 下载数
if (cell.find("a[href*='order_by=leechers']").length) {
fieldIndex.leechers = index;
continue;
}
// 完成数
if (cell.find("a[href*='order_by=snatched']").length) {
fieldIndex.completed = index;
continue;
}
}
try {
// 遍历数据行
for (let index = 1; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
// id
let id = row.find("a[href*='torrentid=']").first().attr("href")
id = id.match(/torrentid=(\d+)/)[1]
// 标题
let title = row.find("[style='float:none;']").first().attr("title");
// 链接
let link = row.find("[title='View Torrent']").first().attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
// 获取下载链接
let url = row.find("[title='Download']").first().attr("href");
if (url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
// 分类
let category = row.find("a[href*='filter_cat']").children().first().attr("title");
// 时间
let timeStrMatch = row.find("div:contains('Added:')").text().match(/Added:(.+)ago/);
let timeStr = (timeStrMatch && timeStrMatch.length >=2) ? timeStrMatch[1].trim() : "";
let data = {
id,
title,
link,
url,
size:
fieldIndex.size == -1
? ""
: cells.eq(fieldIndex.size).text() || 0,
time: this.getTime(timeStr),
author:
fieldIndex.author == -1
? ""
: cells.eq(fieldIndex.author).text() || "",
seeders:
fieldIndex.seeders == -1
? ""
: cells.eq(fieldIndex.seeders).text() || 0,
leechers:
fieldIndex.leechers == -1
? ""
: cells.eq(fieldIndex.leechers).text() || 0,
completed:
fieldIndex.completed == -1
? ""
: cells.eq(fieldIndex.completed).text() || 0,
comments:
fieldIndex.comments == -1
? ""
: cells.eq(fieldIndex.comments).text() || 0,
site,
entryName: options.entry.name,
category
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
}
} catch (error) {
console.error(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.stack}`;
}
return results;
}
getTime(timeStr) {
let timeRegex = timeStr.match(
/((\d+).+?(minute|hour|day|week|month|year)s?.*?(\,|and))?.*?(\d+).+?(minute|hour|day|week|month|year)s?/
);
let milliseconds = 0;
if (timeRegex) {
if (timeRegex[1] == undefined) {
milliseconds = this.getMilliseconds(timeRegex[5], timeRegex[6]);
} else {
milliseconds = this.getMilliseconds(timeRegex[2], timeRegex[3]) + this.getMilliseconds(timeRegex[5], timeRegex[6]);
}
}
console.log(timeRegex);
let timeStamp = Date.now() - milliseconds;
let date = new Date(timeStamp);
return date.toISOString();
}
getMilliseconds(num, unit) {
let milliseconds = 0;
milliseconds = num*60*1000;
if(unit == "minute") {return milliseconds;}
milliseconds = milliseconds*60;
if(unit == "hour") {return milliseconds;}
milliseconds = milliseconds*24;
if(unit == "day") {return milliseconds;}
milliseconds = milliseconds*7;
if(unit == "week") {return milliseconds;}
milliseconds = milliseconds*30/7;
if(unit == "month") {return milliseconds;}
milliseconds = milliseconds*12;
return milliseconds;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options);
================================================
FILE: resource/sites/brokenstones.is/config.json
================================================
{
"name": "BRKS",
"timezoneOffset": "+0000",
"description": "Mac Apps",
"url": "https://brokenstones.is",
"tags": ["软件"],
"schema": "GazelleJSONAPI",
"host": "brokenstones.is",
"formerHosts": [
"brokenstones.club"
],
"supportedFeatures": {
"imdbSearch": false
},
"searchEntryConfig": {
"skipIMDbId": true
}
}
================================================
FILE: resource/sites/bt.neu6.edu.cn/config.json
================================================
{
"name": "六维空间",
"description": "东北大学ipv6资源分享平台",
"url": "http://bt.neu6.edu.cn/",
"icon": "http://bt.neu6.edu.cn/favicon.ico",
"tags": [
"教育网",
"综合"
],
"schema": "Discuz",
"supportedFeatures": {
"search": false,
"imdbSearch": false,
"userData": "◐",
"sendTorrent": false
},
"host": "bt.neu6.edu.cn",
"collaborator": "xfl03",
"selectors": {
"userBaseInfo": {
"page": "/forum.php",
"fields": {
"id": {
"selector": ".vwmy a[href*='home.php']:first",
"attribute": "href",
"filters": [
"query ? query.getQueryString('uid'):''"
]
},
"name": {
"selector": ".vwmy a[href*='home.php']:first"
},
"isLogged": {
"selector": [
"a[href*='action=logout']"
],
"filters": [
"query.length>0"
]
}
}
},
"userExtendInfo": {
"page": "/home.php?mod=space&uid=$user.id$&do=profile",
"fields": {
"uploaded": {
"selector": [
"li:contains('上传')"
],
"filters": [
"query.text().match(/上传.*?([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():null"
]
},
"downloaded": {
"selector": [
"li:contains('下载')"
],
"filters": [
"query.text().match(/下载.*?([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():null"
]
},
"levelName": {
"selector": "li:contains('用户组')",
"filters": [
"query.text().replace('用户组','')"
]
},
"bonus": {
"selector": [
"li:contains('积分')"
],
"filters": [
"query.text().match(/积分.*?([\\d.]+)/)[1]",
"parseFloat(query)"
]
},
"joinTime": {
"selector": "li:contains('注册时间')",
"filters": [
"query.text().match(/注册时间.*?([\\d.]+-[\\d.]+-[\\d.]+)/)[1]",
"dateTime(query).isValid()?dateTime(query).valueOf():query"
]
}
}
}
}
}
================================================
FILE: resource/sites/bwtorrents.tv/config.json
================================================
{
"name": "BWT",
"timezoneOffset": "+0000",
"description": "bwtorrents",
"url": "https://bwtorrents.tv/",
"icon": "https://bwtorrents.tv/favicon.ico",
"tags": ["综合", "印度"],
"schema": "Common",
"host": "bwtorrents.tv",
"plugins": [{
"name": "种子详情页面",
"pages": ["/details.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/details.js"]
}, {
"name": "种子列表",
"pages": ["/index.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/torrents.js"]
}],
"searchEntryConfig": {
"page": "/index.php",
"resultType": "html",
"queryString": "search=$key$&blah=0&cat=0&incldead=1",
"parseScriptFile": "/schemas/Common/getSearchResult.js",
"resultSelector": "table.pager:first + table",
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"parseScript": "(payload && payload.en)?payload.en:key"
}],
"firstDataRowIndex": 1,
"fieldIndex": {
"title": 1,
"time": 4,
"size": 5,
"seeders": 7,
"leechers": 8,
"completed": 9,
"comments": 3,
"author": 10,
"category": 0,
"url": 6,
"link": 1
},
"loggedRegex": "logout\\.php",
"fieldSelector": {
"title": {
"selector": ["a:first"]
},
"url": {
"selector": ["a:first"],
"filters": ["query.attr('href')"]
},
"link": {
"selector": ["a:first"],
"filters": ["query.attr('href')"]
},
"time": {
"selector": ["nobr"],
"filters": ["query.text().replace(/(\\d{2})-(\\d{2})-(\\d{4})\\n?(\\d{2}:\\d{2}:\\d{2})/,'$3-$2-$1 $4')"]
},
"category": {
"selector": ["img:first"],
"filters": ["query.attr('alt')"]
}
}
},
"searchEntry": [{
"name": "all",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "font[color='red']:contains('[FreeLeech]')"
}],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"id": {
"selector": ["a[href*='userdetails.php']:first"],
"attribute": "href",
"filters": ["query ? query.getQueryString('id'):''"]
},
"name": {
"selector": ["a[href*='userdetails.php']:first"],
"filters": ["query && query.attr('href').getQueryString('id') > 0 ? query.text(): ''"]
},
"isLogged": {
"selector": ["a[href*='logout.php']"],
"filters": ["query.length>0"]
}
}
},
"userExtendInfo": {
"page": "/userdetailsmore.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": ["td.rowhead:contains('Uploaded') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["td.rowhead:contains('Downloaded') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"levelName": {
"selector": "td.rowhead:contains('Class') + td"
},
"joinTime": {
"selector": "td.rowhead:contains('Join') + td",
"filters": ["query.text().split(' (')[0]", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
},
"seeding": {
"selector": ["#ka1 table.main > tbody > tr"],
"filters": ["query.length-1"]
},
"seedingSize": {
"selector": ["#ka1 table.main > tbody > tr:not(:eq(0))"],
"filters": ["jQuery.map(query.find('td:eq(6)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
},
"bonus": {
"value": "N/A"
}
}
},
"/details.php": {
"fields": {
"size": {
"selector": ["span[title='File Size']"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"]
},
"downloadURL": {
"selector": ["a[href*='download.php/']:first"],
"filters": ["query.attr('href')"]
}
}
},
"/index.php": {
"fields": {
"downloadURLs": {
"selector": ["a[href*='download.php']"],
"filters": ["query.toArray()"]
},
"confirmSize": {
"selector": ["table.pager:first + table"],
"filters": ["query.find(\"td:contains('MB'),td:contains('GB'),td:contains('TB')\")"]
}
}
}
}
}
================================================
FILE: resource/sites/byr.pt/config.json
================================================
{
"name": "BYRBT",
"timezoneOffset": "+0800",
"description": "著名教育网PT站点(仅支持ipv6访问与下载),有10大类资源,资源更新快,保种好。",
"url": "https://byr.pt/",
"icon": "https://byr.pt/favicon.ico",
"tags": [
"教育网",
"影视",
"综合"
],
"schema": "NexusPHP",
"host": "byr.pt",
"collaborator": ["Rhilip", "yuanyiwei"],
"formerHosts": [
"bt.byr.cn"
],
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "2",
"uploaded": "32GB",
"ratio": "1.05",
"privilege": "可以查看NFO文档;可以查看用户列表;可以请求续种;可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为“强”);可以删除自己上传的字幕"
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"uploaded": "512GB",
"ratio": "1.55",
"privilege": "Elite User及以上用户封存账号后不会被删除;可以发送邀请;可以直接发布种子"
},{
"level": "3",
"name": "Crazy User",
"interval": "12",
"uploaded": "1024GB",
"ratio": "2.05",
"privilege": "可以在做种/下载/发布的时候选择匿名模式"
},{
"level": "4",
"name": "Insane User",
"interval": "24",
"uploaded": "2048GB",
"ratio": "2.55",
"privilege": "可以查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "24",
"uploaded": "4096GB",
"ratio": "3.05",
"privilege": "可以查看其它用户的评论、帖子历史。Veteran User及以上的用户会永远保留账号"
},{
"level": "6",
"name": "Extreme User",
"interval": "24",
"uploaded": "8192GB",
"ratio": "3.55",
"privilege": "可以更新过期的外部信息"
},{
"level": "7",
"name": "Ultimate User",
"interval": "48",
"uploaded": "32768GB",
"ratio": "4.05",
"privilege": "更加高级"
},{
"level": "8",
"name": "Nexus Master",
"interval": "48",
"uploaded": "131072GB",
"ratio": "4.55",
"privilege": "更加高级"
}],
"searchEntry": [{
"entry": "/torrents.php?search=$key$¬newword=1",
"name": "全站",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": true
},
{
"entry": "/torrents.php?cat408=1&search=$key$¬newword=1",
"name": "电影",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"entry": "/torrents.php?cat401=1&search=$key$¬newword=1",
"name": "剧集",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"entry": "/torrents.php?cat404=1&search=$key$¬newword=1",
"name": "动漫",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"entry": "/torrents.php?cat402=1&search=$key$¬newword=1",
"name": "音乐",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"entry": "/torrents.php?cat405=1&search=$key$¬newword=1",
"name": "综艺",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"entry": "/torrents.php?cat403=1&search=$key$¬newword=1",
"name": "游戏",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"entry": "/torrents.php?cat406=1&search=$key$¬newword=1",
"name": "软件",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"entry": "/torrents.php?cat407=1&search=$key$¬newword=1",
"name": "资料",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"entry": "/torrents.php?cat409=1&search=$key$¬newword=1",
"name": "体育",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"entry": "/torrents.php?cat410=1&search=$key$¬newword=1",
"name": "纪录",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
}
],
"categories": [{
"entry": "torrents.php",
"result": "&cat=$id$&cat$id$=1",
"category": [{
"id": 408,
"name": "电影"
},
{
"id": 401,
"name": "剧集"
},
{
"id": 404,
"name": "动漫"
},
{
"id": 402,
"name": "音乐"
},
{
"id": 405,
"name": "综艺"
},
{
"id": 403,
"name": "游戏"
},
{
"id": 406,
"name": "软件"
},
{
"id": 407,
"name": "资料"
},
{
"id": 409,
"name": "体育"
},
{
"id": 410,
"name": "纪录"
}
]
}]
}
================================================
FILE: resource/sites/carpt.net/config.json
================================================
{
"name": "CarPT",
"timezoneOffset": "+0800",
"description": "CarPT",
"url": "https://carpt.net/",
"icon": "https://carpt.net/favicon.ico",
"tags": [],
"schema": "NexusPHP",
"host": "carpt.net",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"downloaded": "200GB",
"ratio": "2",
"seedingPoints": "40000",
"privilege": "得到一个邀请名额;可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种;可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\");可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "500GB",
"ratio": "3",
"seedingPoints": "80000",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "1TB",
"ratio": "4",
"seedingPoints": "150000",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"downloaded": "2TB",
"ratio": "5",
"seedingPoints": "250000",
"privilege": "可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "40",
"downloaded": "4TB",
"ratio": "6",
"seedingPoints": "400000",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "60",
"downloaded": "6TB",
"ratio": "7",
"seedingPoints": "600000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛;Extreme User及以上用户会永远保留账号。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "80",
"downloaded": "8TB",
"ratio": "8",
"seedingPoints": "800000",
"privilege": "得到五个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "100",
"downloaded": "10TB",
"ratio": "9",
"seedingPoints": "1000000",
"privilege": "得到十个邀请名额;可以发送邀请。"
}
],
"collaborator": ["koal", "zhuweitung", "tedzhu"],
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
},
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(0) > div:last"],
"filters": ["query ? parseFloat(query.attr('title').match(/[\\d.]+/)) : null"]
},
"status": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(0) > div:last"],
"filters": [
"query ? query.attr('title') : ''",
"query.indexOf('seeding') != -1 ? 2 : query.indexOf('leeching') != -1 ? 1 : query.indexOf('100%') != -1 ? 255 : 3"
]
}
}
}
}
================================================
FILE: resource/sites/ccfbits.org/browse.js
================================================
(function($) {
console.log("this is browse.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons(true);
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $("a.bookmark").toArray();
let urls = $.map(links, item => {
let id = $(item).attr("tid");
return this.getDownloadURL(id);
});
if (links.length == 0) {
return "获取下载链接失败,未能正确定位到链接";
}
return urls;
}
getDownloadURL(id) {
// 格式:vvvid|||passkeyzz
let key = new Base64().encode(
"vvv" + id + "|||" + PTService.site.passkey + "zz"
);
return `https://${PTService.site.host}/rssdd.php?par=${key}&ssl=yes`;
}
/**
* 执行指定的操作
* @param {*} action 需要执行的执令
* @param {*} data 附加数据
* @return Promise
*/
call(action, data) {
return new Promise((resolve, reject) => {
switch (action) {
// 从当前的DOM中获取下载链接地址
case PTService.action.downloadFromDroper:
this.downloadFromDroper(data, () => {
resolve();
});
break;
}
});
}
/**
* 下载拖放的种子
* @param {*} data
* @param {*} callback
*/
downloadFromDroper(data, callback) {
if (!PTService.site.passkey) {
PTService.showNotice({
msg: "请先设置站点密钥(Passkey)。"
});
callback();
return;
}
if (typeof data === "string") {
data = {
url: data,
title: ""
};
}
let result = this.getDroperURL(data.url);
if (!result) {
callback();
return;
}
this.sendTorrentToDefaultClient(result)
.then(result => {
callback(result);
})
.catch(result => {
callback(result);
});
}
/**
* 获取有效的拖放地址
* @param {*} url
*/
getDroperURL(url) {
let values = url.split("/");
let id = values[values.length - 2];
let result = this.getDownloadURL(id);
return result;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("#torrent_table").find(
"td[align='center']:contains('MB'),td[align='center']:contains('GB'),td[align='center']:contains('TB')"
)
);
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/ccfbits.org/config.json
================================================
{
"name": "CCFBits",
"timezoneOffset": "+0800",
"description": "",
"url": "https://ccfbits.org/",
"icon": "https://ccfbits.org/favicon.ico",
"tags": [
"影视",
"剧集",
"综合"
],
"host": "ccfbits.org",
"levelRequirements": [{
"level": "1",
"name": "初级会员",
"interval": "4",
"uploaded": "25GB",
"ratio": "1.05"
},{
"level": "2",
"name": "中级会员",
"interval": "8",
"downloaded": "50GB",
"uploaded": "200GB",
"ratio": "1.1"
},{
"level": "3",
"name": "高级会员",
"interval": "12",
"downloaded": "100GB",
"uploaded": "500GB",
"ratio": "1.2"
},{
"level": "4",
"name": "超级会员",
"interval": "24",
"downloaded": "200GB",
"uploaded": "1TB",
"ratio": "1.3"
},{
"level": "5",
"name": "支柱会员",
"interval": "32",
"downloaded": "300GB",
"uploaded": "5TB",
"ratio": "2"
}],
"plugins": [{
"name": "种子详情页面",
"pages": [
"^/t/(\\d+)/$",
"/details.php"
],
"scripts": [
"/schemas/NexusPHP/common.js",
"details.js"
]
},
{
"name": "种子列表",
"pages": [
"/browse.php"
],
"scripts": [
"/schemas/NexusPHP/common.js",
"browse.js"
]
}
],
"collaborator": "Rhilip",
"searchEntry": [{
"entry": "browse.php?search=$key$¬newword=1",
"name": "全站",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "font[color=\"#C20603\"]:contains('免费')",
"color": "blue"
},
{
"name": "30%",
"selector": "font[color=\"#C20603\"]:contains('0.3x')",
"color": "indigo"
},
{
"name": "50%",
"selector": "font[color=\"#C20603\"]:contains('0.5x')",
"color": "orange"
}
],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": "a[href*='userdetails.php']:first",
"attribute": "href",
"filters": [
"query ? query.getQueryString('id'):''"
]
},
"name": {
"selector": "a[href*='userdetails.php']:first"
},
"isLogged": {
"selector": [
"a[href*='logout.php']"
],
"filters": [
"query.length>0"
]
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": [
"td.rowhead:contains('上传量') + td",
"td.rowhead:contains('上傳量') + td"
],
"filters": [
"query.eq(0)",
"query.text().replace(/,/g,'').sizeToNumber()"
]
},
"downloaded": {
"selector": [
"td.rowhead:contains('下载量') + td",
"td.rowhead:contains('下載量') + td"
],
"filters": [
"query.eq(0)",
"query.text().replace(/,/g,'').sizeToNumber()"
]
},
"levelName": {
"selector": [
"td.rowhead:contains('等级') + td",
"td.rowhead:contains('等級') + td"
]
},
"bonus": {
"selector": [
"td.rowhead:contains('积分') + td",
"td.rowhead:contains('積分') + td"
],
"filters": [
"parseFloat(query.text())"
]
},
"joinTime": {
"selector": [
"td.rowhead:contains('注册日期') + td",
"td.rowhead:contains('註冊日期') + td"
],
"filters": [
"dateTime(query.text()).isValid()?dateTime(query.text()).valueOf():query.text()"
]
},
"seeding": {
"selector": [
"div#ka1 tr:not(:eq(0))"
],
"filters": [
"query.length"
]
},
"seedingSize": {
"selector": [
"div#ka1 tr:not(:eq(0))"
],
"filters": [
"jQuery.map(query.find('td:eq(3)'), (item)=>{return $(item).text();})",
"_self.getTotalSize(query)"
]
}
}
}
},
"supportedFeatures": {
"imdbSearch": false,
"userData": "◐"
}
}
================================================
FILE: resource/sites/ccfbits.org/details.js
================================================
(function ($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.showTorrentSize();
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
// 有一些扩展会为链接添加class,导致选择器失效,因此使用正则来获取链接
// let query = $("a[href*='/dl/']:not([class])");
let query = $("a[href*='download.php']")
let url = "";
if (query.length > 0) {
url = query.attr("href");
// 直接获取的链接下载成功率很低
// 如果设置了 passkey 则使用 rss 订阅的方式下载
if (PTService.site.passkey) {
let values = url.split("/");
let id = values[values.length - 2];
// 格式:vvvid|||passkeyzz
let key = (new Base64).encode("vvv" + id + "|||" + PTService.site.passkey + "zz");
url = `https://${PTService.site.host}/rssdd.php?par=${key}&ssl=yes`;
}
}
return url;
}
showTorrentSize() {
let query = $("td[valign='top'][align='left']:contains('字节')");
let size = "";
if (query.length > 0) {
size = query.text().split(" (")[0];
// attachment
PTService.addButton({
title: "当前种子大小",
icon: "attachment",
label: size
});
}
}
getTitle() {
return /"(.*?)"/.exec($("title").text())[1];
}
}
(new App()).init();
})(jQuery, window);
================================================
FILE: resource/sites/ccfbits.org/getSearchResult.js
================================================
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
if (/loginform/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
if (/没有找到匹配种子/.test(options.responseText)) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let results = [];
let site = options.site;
// 获取种子列表行
let rows = options.page.find(
"table.mainouter > tbody > tr:eq(1) > td > table:last > tbody > tr"
);
const time_regex = /(\d{4}-\d{2}-\d{2}[^\d]+?\d{2}:\d{2}:\d{2})/;
const time_regen_replace = /-(\d{2})[^\d]+?(\d{2}):/;
const size_regex = /[\d.]+ [MGT]B/;
// 用于定位每个字段所列的位置
let fieldIndex = {
time: 4, // 时间
seeders: 7, // 上传人数
leechers: 8, // 下载人数
author: 9, // 发布人
category: 0
};
if (site.url.substr(-1) === "/") {
site.url = site.url.substr(0, site.url.length - 1);
}
// 遍历数据行
for (let index = 1; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
// 主副标题从cells.eq(1)中获取
let _title_cell = cells.eq(1);
let _title = _title_cell.find("> table > tbody > tr");
if (_title.length != 2) {
continue;
}
let main_title_cell = _title.eq(0).find('a[href^="details.php"]');
let title = main_title_cell.attr("title").trim();
let sub_title_cell = _title.eq(1).find("td:eq(0)");
let sub_title = sub_title_cell.text().trim();
let link = main_title_cell.attr("href");
if (link && link.substr(0, 4) !== "http") {
if (link.substr(0, 1) == "/") {
link = `${site.url}${link}`;
} else {
link = `${site.url}/${link}`;
}
}
let url_cell = cells.eq(2).find('a[href^="download.php"]');
let url = url_cell.attr("href");
if (url && url.substr(0, 4) !== "http") {
if (url.substr(0, 1) == "/") {
url = `${site.url}${url}`;
} else {
url = `${site.url}/${url}`;
}
}
if (!url) {
continue;
}
let size_completed_cell = cells.eq(6);
let _size = (size_completed_cell.text().match(size_regex) || [0])[0];
let _completed = (size_completed_cell.text().match(/(\d+) 次/) || [
0,
0
])[1];
let comments_cell = cells.eq(3);
let _comments = (comments_cell.text().match(/(\d+) 评论/) || [0, 0])[1];
let data = {
title: title,
subTitle: sub_title,
link,
url: url,
size: _size,
time:
cells
.eq(fieldIndex.time)
.html()
.match(time_regex)[1]
.replace(time_regen_replace, "-$1 $2:") ||
cells.eq(fieldIndex.time).text(),
author: cells.eq(fieldIndex.author).text() || "",
seeders: cells.eq(fieldIndex.seeders).text() || 0,
leechers: cells.eq(fieldIndex.leechers).text() || 0,
completed: _completed,
comments: _comments,
site: site,
entryName: options.entry.name,
category: this.getCategory(cells.eq(fieldIndex.category)),
tags: Searcher.getRowTags(site, row)
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
}
return results;
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: "",
link: ""
};
let link = cell.find("a:first");
let img = link.find("img:first");
result.link = link.attr("href");
if (result.link.substr(0, 4) !== "http") {
result.link = options.site.url + result.link;
}
result.name = img.attr("alt");
return result;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/sites/chdbits.co/config.json
================================================
{
"name": "CHDBits",
"timezoneOffset": "+0800",
"description": "CHDBits",
"url": "https://chdbits.co/",
"icon": "https://chdbits.co/favicon.ico",
"tags": [
"影视",
"综合"
],
"schema": "NexusPHP",
"host": "chdbits.co",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "5",
"downloaded": "200GB",
"ratio": "2.0",
"bonus": "80000",
"privilege": "查看NFO文档;请求续种;查看排行榜可以查看其它用户的种子历史;删除自己上传的字幕"
},{
"level": "2",
"name": "Elite User",
"interval": "10",
"downloaded": "500GB",
"ratio": "3",
"bonus": "150000",
"privilege": "无"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "800GB",
"ratio": "4.0",
"bonus": "300000",
"privilege": "在做种/下载的时候选择匿名模式"
},{
"level": "4",
"name": "Insane User",
"interval": "20",
"downloaded": "999GB",
"ratio": "5.0",
"bonus": "650000",
"privilege": "查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "25",
"downloaded": "1500GB",
"ratio": "6.0",
"bonus": "1000000",
"privilege": "查看其它用户的评论、帖子历史"
},{
"level": "6",
"name": "Extreme User",
"interval": "30",
"downloaded": "2TB",
"ratio": "7.0",
"bonus": "2200000",
"privilege": "用户封存账号(在控制面板)后不会被删除帐号;首次升级赠送邀请1枚,更新过期的外部信息;查看Extreme User论坛"
},{
"level": "7",
"name": "Ultimate User",
"interval": "40",
"downloaded": "3TB",
"ratio": "8.0",
"bonus": "3500000",
"privilege": "用户会永远保留;首次升级赠送邀请2枚,保留帐号,在官方活动期间可发放邀请"
},{
"level": "8",
"name": "Nexus Master",
"interval": "52",
"downloaded": "4TB",
"ratio": "10.0",
"bonus": "5000000",
"privilege": "首次升级赠送邀请3枚,保留帐号,在官方活动期间可发放邀请"
}],
"searchEntry": [{
"name": "全站",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": true
},
{
"queryString": "cat401=1",
"name": "Movies",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "Documentaries",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"queryString": "cat405=1",
"name": "Animations",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"queryString": "cat402=1",
"name": "TV Series",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"queryString": "cat403=1",
"name": "TV Shows",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"queryString": "cat406=1",
"name": "Music",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"queryString": "cat407=1",
"name": "Sports",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"queryString": "cat409=1",
"name": "Demo",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"queryString": "cat408=1",
"name": "HQ Audio",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
},
{
"queryString": "cat410=1",
"name": "Game",
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last > tbody > tr",
"enabled": false
}
],
"torrentTagSelectors": [{
"name": "Free",
"selector": "img.pro_free"
}, {
"name": "2xFree",
"selector": "img.pro_free2up"
}, {
"name": "2xUp",
"selector": "img.pro_2up"
}, {
"name": "2x50%",
"selector": "img.pro_50pctdown2up"
}, {
"name": "30%",
"selector": "img.pro_30pctdown"
}, {
"name": "50%",
"selector": "img.pro_50pctdown"
}, {
"name": "⛔️",
"selector": ".tag.tag-dz"
}],
"searchEntryConfig": {
"merge": true,
"fieldSelector": {
"progress": {
"selector": ["td.rowfollow:last-child"],
"filters": ["query.text()=='--'?null:query"]
},
"status": {
"selector": ["td.rowfollow:last-child"],
"filters": ["query.text()=='100%'?255:3"]
}
}
},
"categories": [{
"entry": "torrents.php",
"result": "&cat=$id$&cat$id$=1",
"category": [{
"id": 401,
"name": "Movies"
},
{
"id": 404,
"name": "Documentaries"
},
{
"id": 405,
"name": "Animations"
},
{
"id": 402,
"name": "TV Series"
},
{
"id": 403,
"name": "TV Shows"
},
{
"id": 406,
"name": "Music"
},
{
"id": 407,
"name": "Sports"
},
{
"id": 409,
"name": "Demo"
},
{
"id": 408,
"name": "HQ Audio"
},
{
"id": 410,
"name": "Game"
}
]
}]
}
================================================
FILE: resource/sites/cinemageddon.net/browse.js
================================================
(function($) {
console.log("this is browse.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $(
"table.torrenttable:last a[href*='download.php?id=']"
).toArray();
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (links.length == 0) {
// "获取下载链接失败,未能正确定位到链接";
return this.t("getDownloadURLsFailed");
}
let urls = $.map(links, item => {
let link = $(item).attr("href");
if (link && link.substr(0, 4) != "http") {
link = siteURL + link;
}
return link;
});
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("table.torrenttable:last").find(
"td:contains('MB'),td:contains('GB'),td:contains('TB')"
)
);
}
/**
* 获取有效的拖放地址
* @param {*} url
*/
getDroperURL(url) {
if (url.indexOf("download.php") === -1) {
return "";
}
return url;
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/cinemageddon.net/config.json
================================================
{
"name": "CinemaGeddon",
"timezoneOffset": "+0000",
"schema": "CinemaGeddon",
"url": "https://cinemageddon.net/",
"icon": "https://cinemageddon.net/favicon.ico",
"tags": ["影视"],
"host": "cinemageddon.net",
"collaborator": "DXV5",
"plugins": [{
"name": "种子详情页面",
"pages": ["/details.php"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["/browse.php"],
"scripts": ["/schemas/NexusPHP/common.js", "browse.js"]
}],
"levelRequirements": [
{
"level": "1",
"name": "Power User",
"uploaded": "25GB",
"downloaded": "20GB",
"ratio": "1.2",
"privilege": "Maximum of 8 concurrent downloads"
},
{
"level": "2",
"name": "CG Superfan",
"uploaded": "200GB",
"downloaded": "20GB",
"ratio": "1.5",
"privilege": "Maximum of 12 concurrent downloads"
}
],
"searchEntryConfig": {
"page": "/browse.php",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"queryString": "search=$key$&proj=0",
"resultSelector": "table.torrenttable:last > tbody > tr"
},
"searchEntry": [{
"name": "all",
"enabled": true
}],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"id": {
"selector": ".statusbar a[href*='/userdetails.php?id=']",
"attribute": "href",
"filters": ["query ? query.getQueryString('id'):''"]
},
"name": {
"selector": ".statusbar a[href*='/userdetails.php?id=']"
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": ["td.clx > .frames td.rowhead:contains('Uploaded') + td:first"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["td.clx > .frames td.rowhead:contains('Downloaded') + td:first"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"levelName": {
"selector": "td.clx > .frames td.rowhead:contains('Class') + td:first"
},
"messageCount": {
"selector": ["div.alert a[href*='messages.php']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
},
"bonus": {
"selector": ["a[href='/credits.php']"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+)/)", "(query && query.length>=2)?query[1]:''"]
},
"joinTime": {
"selector": "td.clx > .frames td.rowhead:contains('Join') + td:first",
"filters": ["query.text().split(' (')[0]", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
},
"seeding": {
"selector": ["div#ka2 table:first tr:not(:eq(0))"],
"filters": ["query.length"]
},
"seedingSize": {
"selector": ["div#ka2 table:first tr:not(:eq(0))"],
"filters": ["jQuery.map(query.find('td:eq(2)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
}
}
}
}
}
================================================
FILE: resource/sites/cinemageddon.net/details.js
================================================
(function($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.showTorrentSize();
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
let query = $("a.index[href*='download.php?id=']");
let url = "";
if (query.length > 0) {
url = query.attr("href");
}
if (!url) {
return "";
}
return `${location.origin}/${url}`;
}
showTorrentSize() {
let query = $("td.rowhead:contains('Size') + td");
let size = "";
if (query.length > 0) {
size = query.text().match(/^[^\(]+/);
// attachment
PTService.addButton({
title: "当前种子大小",
icon: "attachment",
label: size
});
}
}
/**
* 获取当前种子标题
*/
getTitle() {
return $(".frames tr:first td.colhead:first")
.text()
.trim();
}
}
new App().init();
})(jQuery, window);
================================================
FILE: resource/sites/cinemageddon.net/getSearchResult.js
================================================
if (!"".getQueryString) {
String.prototype.getQueryString = function(name, split) {
if (split == undefined) split = "&";
var reg = new RegExp(
"(^|" + split + "|\\?)" + name + "=([^" + split + "]*)(" + split + "|$)"
),
r;
if ((r = this.match(reg))) return decodeURI(r[2]);
return null;
};
}
(function(options) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/takelogin\.php/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
if (/Nothing found!/.test(options.responseText)) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
let site = options.site;
let results = [];
// 获取种子列表行
let rows = options.page.find(options.resultSelector);
const browsecheck = options.page
.find("a[href*='browse.php?page']:contains('-'):last")
.attr("href");
if (rows.length == 0 || browsecheck) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return results;
}
// 获取表头
let header = rows.eq(0).find("th,td");
// 用于定位每个字段所列的位置
let fieldIndex = {
time: 3,
size: 4,
seeders: 6,
leechers: 7,
completed: 5,
comments: 2,
author: 8,
category: 0,
title: 1
};
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
try {
// 遍历数据行
for (let index = 0; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = row.find("a[href*='details.php?id=']").first();
if (title.length == 0) {
continue;
}
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
// 获取下载链接
let url = row.find("a[href*='download.php?id=']:first").attr("href");
if (url && url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
cells
.eq(fieldIndex.size)
.find("span")
.remove();
let data = {
title: title.text(),
subTitle: "",
link,
url,
size: cells.eq(fieldIndex.size).text() || 0,
time: this.getTime(cells.eq(fieldIndex.time)),
author:
fieldIndex.author == -1
? ""
: cells.eq(fieldIndex.author).text() || "",
seeders:
fieldIndex.seeders == -1
? ""
: cells.eq(fieldIndex.seeders).text() || 0,
leechers:
fieldIndex.leechers == -1
? ""
: cells.eq(fieldIndex.leechers).text() || 0,
completed:
fieldIndex.completed == -1
? ""
: cells.eq(fieldIndex.completed).text() || 0,
comments:
fieldIndex.comments == -1
? ""
: cells.eq(fieldIndex.comments).text() || 0,
site: site,
entryName: options.entry.name,
category: this.getCategory(cells.eq(fieldIndex.category)),
tags: this.getTags(row, options.torrentTagSelectors)
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
}
} catch (error) {
console.error(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.stack}`;
}
return results;
}
/**
* 获取时间
* @param {*} cell
*/
getTime(cell) {
let time = $("")
.html(cell.html().replace("
", " "))
.text();
return time || "";
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: "",
link: ""
};
let link = cell.find("a:first");
let img = link.find("img:first");
result.link = link.attr("href");
if (result.link.substr(0, 4) !== "http") {
result.link = options.site.url + result.link;
}
result.name = img.attr("alt");
return result;
}
/**
* 获取标签
* @param {*} row
* @param {*} selectors
* @return array
*/
getTags(row, selectors) {
let tags = [];
if (selectors && selectors.length > 0) {
// 使用 some 避免错误的背景类名返回多个标签
selectors.some(item => {
if (item.selector) {
let result = row.find(item.selector);
if (result.length) {
tags.push({
name: item.name,
color: item.color
});
return true;
}
}
});
}
return tags;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options);
================================================
FILE: resource/sites/club.hares.top/config.json
================================================
{
"name": "HaresClub",
"timezoneOffset": "+0800",
"description": "2160p/4k 及以上的高清资源站点",
"url": "https://club.hares.top/",
"icon": "https://club.hares.top/favicon.ico",
"tags": ["影视", "纪录片", "综合"],
"schema": "NexusPHP",
"host": "club.hares.top",
"collaborator": ["kevgao", "枕头啊枕头", "bright", "yuanyiwei"],
"formerHosts": [],
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "100GB",
"ratio": "2",
"seedingPoints": "20000",
"privilege": "可以在邀请区回复;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以查看排行榜"
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "350GB",
"ratio": "2.5",
"seedingPoints": "50000",
"privilege": "可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕"
},{
"level": "3",
"name": "Crazy User",
"interval": "16",
"downloaded": "500GB",
"ratio": "3",
"seedingPoints": "200000",
"privilege": "可以直接发布种子;可以发送邀请;可以在做种/下载/发布的时候选择匿名模式"
},{
"level": "4",
"name": "Insane User",
"interval": "20",
"downloaded": "1TB",
"ratio": "3.5",
"seedingPoints": "400000",
"privilege": "得到两个邀请名额;可以查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "25",
"downloaded": "2TB",
"ratio": "4",
"seedingPoints": "600000",
"privilege": "得到四个邀请名额;可以查看其它用户的评论、帖子历史"
},{
"level": "6",
"name": "Extreme User",
"interval": "30",
"downloaded": "4TB",
"ratio": "4.5",
"seedingPoints": "800000",
"privilege": "得到六个邀请名额;可以更新过期的外部信息;可以查看Extreme User论坛。Extreme User用户封存后将永远保留账号"
},{
"level": "7",
"name": "Ultimate User",
"interval": "40",
"downloaded": "6TB",
"ratio": "5",
"seedingPoints": "1000000",
"privilege": "得到八个邀请名额"
},{
"level": "8",
"name": "Nexus Master",
"interval": "52",
"downloaded": "8TB",
"ratio": "5.5",
"seedingPoints": "1200000",
"privilege": "得到十个邀请名额。Nexus Master用户会永远保留账号"
}],
"searchEntryConfig": {
"fieldIndex": {
"title": 1,
"subTitle": 1,
"link": 1,
"url": 1,
"time": 3,
"size": 4,
"seeders": 5,
"leechers": 6,
"completed": 7,
"comments": 2
},
"fieldSelector": {
"title": {
"selector": ["a[href*='details.php?id='][title]:first"],
"filters": ["query"]
},
"subTitle": {
"selector": ["p.layui-elip.layui-torrents-descr-width:first"],
"filters": ["query.text()"]
},
"progress": {
"selector": [
"div[title^='leeching'], div[title^='seeding'], div[title^='inactivity']"
],
"filters": [
"query[0] ? query.attr('title').replace('leeching','').replace('seeding','').replace('inactivity','').replace('%','').trim() : null"
]
},
"status": {
"selector": [
"div[title^='leeching']",
"div[title^='seeding']",
"div[title^='inactivity']"
],
"switchFilters": [
["1"],
["2"],
["query.attr('title').indexOf('100%')!=-1 ? 255:3"]
]
}
}
},
"searchEntry": [
{
"name": "全部",
"enabled": true
},
{
"queryString": "/torrents.php?search_area=0&search=$key$&search_mode=0&cat401=1&incldead=1&spstate=0&check_state=0&can_claim=0&inclbookmarked=0",
"name": "电影",
"enabled": false
},
{
"queryString": "/torrents.php?search_area=0&search=$key$&search_mode=0&cat402=1&incldead=1&spstate=0&check_state=0&can_claim=0&inclbookmarked=0",
"name": "电视剧",
"enabled": false
},
{
"queryString": "/torrents.php?search_area=0&search=$key$&search_mode=0&cat403=1&incldead=1&spstate=0&check_state=0&can_claim=0&inclbookmarked=0",
"name": "综艺",
"enabled": false
},
{
"queryString": "/torrents.php?search_area=0&search=$key$&search_mode=0&cat406=1&incldead=1&spstate=0&check_state=0&can_claim=0&inclbookmarked=0",
"name": "M V",
"enabled": false
},
{
"queryString": "/torrents.php?search_area=0&search=$key$&search_mode=0&cat409=1&incldead=1&spstate=0&check_state=0&can_claim=0&inclbookmarked=0",
"name": "演唱会",
"enabled": false
},
{
"queryString": "/torrents.php?search_area=0&search=$key$&search_mode=0&cat404=1&incldead=1&spstate=0&check_state=0&can_claim=0&inclbookmarked=0",
"name": "纪录片",
"enabled": false
},
{
"queryString": "/torrents.php?search_area=0&search=$key$&search_mode=0&cat405=1&incldead=1&spstate=0&check_state=0&can_claim=0&inclbookmarked=0",
"name": "动漫",
"enabled": false
},
{
"queryString": "/torrents.php?search_area=0&search=$key$&search_mode=0&cat407=1&incldead=1&spstate=0&check_state=0&can_claim=0&inclbookmarked=0",
"name": "体育",
"enabled": false
},
{
"queryString": "/official.php?search_area=0&search=$key$&search_mode=0&team1=1&team2=1&team3=1&incldead=0&spstate=0&check_state=0&can_claim=0&inclbookmarked=0",
"name": "官组(全部)",
"enabled": false
},
{
"queryString": "/official.php?search_area=0&search=$key$&search_mode=0&medium1=1&medium2=1&team1=1&team2=1&team3=1&incldead=0&spstate=0&check_state=0&can_claim=0&inclbookmarked=0",
"name": "官组(原盘|DIY)",
"enabled": false
},
{
"queryString": "/official.php?search_area=0&search=$key$&search_mode=0&medium3=1&team1=1&team2=1&team3=1&incldead=0&spstate=0&check_state=0&can_claim=0&inclbookmarked=0",
"name": "官组(Remux)",
"enabled": false
},
{
"queryString": "/official.php?search_area=0&search=$key$&search_mode=0&medium3=1&team1=1&team2=1&team3=1&incldead=0&spstate=0&check_state=0&can_claim=0&inclbookmarked=0",
"name": "官组(Remux)",
"enabled": false
},
{
"queryString": "/official.php?search_area=0&search=$key$&search_mode=0&medium5=1&team1=1&team2=1&team3=1&incldead=0&spstate=0&check_state=0&can_claim=0&inclbookmarked=0",
"name": "官组(WEB-DL)",
"enabled": false
}
],
"selectors": {
"userBaseInfo": {
"merge": true,
"fields": {
"messageCount": {
"selector": [ ".unread" ],
"filters": [
"query.text().match(/(\\d+)/)",
"(query && query.length>=2)?parseInt(query[1]):0"
]
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"merge": true,
"fields": {
"joinTime": {
"selector": [
".layui-row.layui-userdetails.layui-poll-con.layui-margin-bottom"
],
"filters": [
"query.html().match(/加入日期(.*?)','').replace('(=2)?query.sizeToNumber():null"
]
},
"downloaded": {
"selector": [
".layui-row.layui-userdetails.layui-poll-con.layui-margin-bottom table:eq(1) tbody td:eq(6)"
],
"filters": [
"query.html()",
"(query && query.length >=2)?query.sizeToNumber():null"
]
},
"levelName": {
"selector": [
".layui-row.layui-userdetails.layui-poll-con.layui-margin-bottom table tbody td:eq(10)"
],
"filters": [ "query.text()" ]
},
"bonus": {
"selector": [
".layui-row.layui-userdetails.layui-poll-con.layui-margin-bottom table tbody td:eq(8)"
],
"filters": [ "query.html()" ]
},
"seeding": {
"selector": [ "i.fas.fa-upload.text-success.fa-fw + span.list-info" ],
"filters": [ "query.text().trim()" ]
}
}
},
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?page=1&limit=50&uid=$user.id$&type=seeding",
"dataType": "json",
"headers": {
"Accept": "application/json, text/javascript, */*; q=0.01"
},
"fields": {
"seedingSize": {
"selector": [ "size" ],
"filters": [ "query.sizeToNumber()" ]
}
}
}
},
"plugins": [
{
"name": "官方列表",
"pages": [ "/official.php" ],
"scripts": [
"/schemas/NexusPHP/common.js",
"/schemas/NexusPHP/torrents.js"
]
}
],
"mergeSchemaTagSelectors": true
}
================================================
FILE: resource/sites/cnlang.org/config.json
================================================
{
"name": "国语视界",
"timezoneOffset": "+0800",
"schema": "Discuz",
"supportedFeatures": {
"search": false,
"imdbSearch": false,
"sendTorrent": false
},
"url": "https://cnlang.org/",
"description": "国语视界音轨组,特效字幕组官方首发论坛,国语音轨和特效字幕的分享基地,蓝光DIY和4K电影爱好者的乐园。",
"icon": "https://cnlang.org/favicon.ico",
"tags": ["特效字幕", "国语音轨"],
"collaborator": [
"fzlins"
],
"host": "cnlang.org",
"selectors": {
"userBaseInfo": {
"page": "/home.php?mod=spacecp&ac=credit",
"fields": {
"id": {
"selector": [".vwmy a"],
"attribute": "href",
"filters": ["query ? query.replace(/\\D+/g, '') : '' "]
},
"name": {
"selector": [".vwmy a"]
},
"messageCount": {
"selector": ["a.a.showmenu.new"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
},
"isLogged": {
"selector": [
"a[href*='action=logout']"
],
"filters": [
"query.length>0"
]
},
"bonus": {
"selector": "li:contains('大洋')",
"filters": [
"query.text().match(/大洋.*?([\\d.]+)/)[1]",
"parseFloat(query)"
]
}
}
},
"userExtendInfo": {
"page": "/home.php?mod=spacecp&ac=plugin&id=bt_magnet:action",
"fields": {
"uploaded": {
"selector": ".attach_magnet_div p:contains('上传量')",
"filters": [
"query.text().replace('上传量:', '').trim().sizeToNumber()"
]
},
"downloaded": {
"selector": ".attach_magnet_div p:contains('下载量')",
"filters": [
"query.text().replace('下载量:', '').trim().sizeToNumber()"
]
},
"ratio": {
"selector": ".attach_magnet_div p:contains('分享率:')",
"filters": [
"query.text().replace('分享率:', '').replace(/,/g,'').trim()",
"parseFloat(query)"
]
},
"levelName": {
"selector": ["a[href='home.php?mod=spacecp&ac=usergroup']:first"],
"filters": ["query.text().replace('用户组: ', '').trim()"]
},
"joinTime": {
"selector": ".attach_magnet_div p:contains('加入时间:')",
"filters": [
"query.text().replace('加入时间:', '').trim()",
"dateTime(query).isValid()?dateTime(query).valueOf():query"
]
}
}
},
"userSeedingTorrents": {
"prerequisites": "!user.seeding",
"page": "/home.php?mod=spacecp&ac=plugin&id=bt_magnet:action&subop=seeding",
"parser": "getUserSeedingTorrents.js",
"fields": {
"seeding": {
"selector": [".mn tr:not(:eq(0))"],
"filters": ["query.length"]
},
"seedingSize": {
"selector": [".mn tr:not(:eq(0))"],
"filters": ["jQuery.map(query.find('td:eq(1)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
}
}
}
}
}
================================================
FILE: resource/sites/cnlang.org/getUserSeedingTorrents.js
================================================
if ("".getQueryString === undefined) {
String.prototype.getQueryString = function(name, split) {
if (split == undefined) split = "&";
var reg = new RegExp(
"(^|" + split + "|\\?)" + name + "=([^" + split + "]*)(" + split + "|$)"
),
r;
if ((r = this.match(reg))) return decodeURI(r[2]);
return null;
};
}
(function(options, User) {
class Parser {
constructor(options, dataURL) {
this.options = options;
this.dataURL = dataURL;
this.body = null;
this.rawData = "";
this.pageInfo = {
count: 0,
current: 1
};
this.result = {
seeding: 0,
seedingSize: 0
};
this.load();
}
/**
* 完成
*/
done() {
this.options.resolve(this.result);
}
/**
* 解析内容
*/
parse() {
const doc = new DOMParser().parseFromString(this.rawData, "text/html");
// 构造 jQuery 对象
this.body = $(doc).find("body");
this.getPageInfo();
let results = new User.InfoParser(User.service).getResult(
this.body,
this.options.rule
);
if (results) {
this.result.seeding += results.seeding;
this.result.seedingSize += results.seedingSize;
}
// 是否已到最后一页
if (this.pageInfo.current < this.pageInfo.count) {
this.pageInfo.current++;
this.load();
} else {
this.done();
}
}
/**
* 获取页面相关内容
*/
getPageInfo() {
if (this.pageInfo.count > 0) {
return;
}
// 获取最大页码
const infos = this.body
.find("input[name='custompage']")
.attr("size");
if (infos) {
this.pageInfo.count = parseInt(infos);
} else {
this.pageInfo.count = 1;
}
}
/**
* 加载当前页内容
*/
load() {
let url = this.dataURL;
if (this.pageInfo.current > 0) {
url += "&page=" + this.pageInfo.current;
}
$.get(url)
.done(result => {
this.rawData = result;
this.parse();
})
.fail(() => {
this.done();
});
}
}
let dataURL = options.site.activeURL + options.rule.page;
dataURL = dataURL
.replace("$user.id$", options.userInfo.id)
.replace("$user.name$", options.userInfo.name)
.replace("://", "****")
.replace(/\/\//g, "/")
.replace("****", "://");
new Parser(options, dataURL);
})(_options, _self);
/**
*
_options 表示当前参数
{
site,
rule,
userInfo,
resolve,
reject
}
_self 表示 User(/src/background/user.ts) 类实例
*/
================================================
FILE: resource/sites/concertos.live/config.json
================================================
{
"name": "Concertos",
"timezoneOffset": "+0000",
"description": "Concertos",
"url": "https://concertos.live/",
"tags": ["MV"],
"schema": "Common",
"plugins": [{
"name": "种子详情页面",
"pages": ["/torrent/"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/details.js"]
}, {
"name": "种子列表",
"pages": ["/torrents"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/torrents.js"]
}],
"host": "concertos.live",
"searchEntryConfig": {
"page": "/torrents?title=$key$&order_by=created_at&direction=desc",
"resultType": "html",
"resultSelector": "table.table.table--bordered-big.torrents",
"fieldIndex": {
"category": 0,
"title": 1,
"link": 1,
"url": 1,
"time": 2,
"size": 3,
"author": 1,
"seeders": 4,
"leechers": 5,
"completed": 6
},
"fieldSelector": {
"title": {
"selector": ["a.torrents__title"],
"filters": ["query.text()"]
},
"link": {
"selector": ["a.torrents__title"],
"filters": ["query.attr('href')"]
},
"url": {
"selector": ["a.torrents__title"],
"filters": ["query.attr('href')", "query + '/download'"]
},
"time": {
"selector": [""],
"filters": [""]
}
}
},
"searchEntry": [{
"name": "全部",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "img[src='images/freeleech.png']"
}],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"name": {
"selector": ["div.user-info"],
"filters": ["$(query[0].firstChild).text().trim()"]
},
"id": {
"selector": [".nav > a.nav__link[href*='/user']:first"],
"filters": ["query.attr('href').replace('https://concertos.live/user/', '')"]
},
"isLogged": {
"selector": ["div.user-info"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["div.info-bar"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
},
"uploaded": {
"selector": [".user-info__item > .fa-upload"],
"filters": ["query.parent().text().trim().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": [".user-info__item > .fa-download"],
"filters": ["query.parent().text().trim().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"ratio": {
"selector": [".user-info__item > .fa-percent"],
"filters": ["query.parent().text().trim().replace('Ratio: ', '')"]
},
"levelName": {
"selector": [".user-info__item > .fa-bolt"],
"filters": ["query.parent().text().trim().replace(/(?<=.*)\\s[^\\s]*$/,'')"]
}
}
},
"userExtendInfo": {
"page": "/user/$user.id$",
"fields": {
"joinTime": {
"selector": ["div.profile-block__age"],
"filters": ["dateTime(query.text().replace('Member since ', '')).valueOf()"]
},
"bonus": {
"selector": ["td:contains('BONs') + td"],
"filters": ["query.text().trim().replace(' ', '')"]
},
"seeding": {
"selector": ["td:contains('Total Seeding') + td"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):null"]
},
"seedingSize": {
"value": -1
}
}
},
"common": {
"page": "/torrent/",
"fields": {
"downloadURL": {
"selector": ["a[href*='/download']"],
"filters": ["query.attr('href')"]
},
"size": {
"selector": ["td.torrent__meta-title:contains('Size') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"]
},
"sayThanksButton": {
"selector": ["a[href*='/thank']"],
"filters": ["query"]
},
"downloadURLs": {
"selector": ["a.torrents__title"],
"filters": ["query.toArray()", "query.map((item)=>{return item.href+'/download'})"]
},
"confirmSize": {
"selector": ["table.table.table--bordered-big.torrents"],
"filters": ["query.find('td.torrents__size')"]
}
}
}
}
}
================================================
FILE: resource/sites/cyanbug.net/config.json
================================================
{
"name": "CyanBug",
"description": "大青虫们在此聚集",
"timezoneOffset": "+0800",
"schema": "NexusPHP",
"host": "cyanbug.net",
"url": "https://cyanbug.net",
"icon": "https://cyanbug.net/favicon.ico",
"ver": "0.0.1",
"tags": [
"综合",
"影视"
],
"collaborator": [
"jinglekang"
],
"levelRequirements": [
{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"seedingPoints": "40000",
"privilege": "得到一个邀请名额;可以直接发布种子;可以查看NFO文档;可以请求续种;可以发送邀请;可以查看排行榜;可以删除自己上传的字幕。"
},
{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"seedingPoints": "80000",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"seedingPoints": "150000",
"privilege": "得到两个邀请名额; 可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": "4",
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"seedingPoints": "250000",
"privilege": "可以查看普通日志。"
},
{
"level": "5",
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"seedingPoints": "400000",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史;Veteran User及以上用户会永远保留账号。"
},
{
"level": "6",
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"seedingPoints": "600000",
"privilege": "可可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": "7",
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"seedingPoints": "800000",
"privilege": "得到五个邀请名额。"
},
{
"level": "8",
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"seedingPoints": "1000000",
"privilege": "得到十个邀请名额。"
}
],
"securityKeyFields": [
"passkey"
],
"searchEntryConfig": {
"page": "/torrents.php",
"queryString": "search=$key$¬newword=1",
"area": [
{
"name": "标题",
"appendQueryString": "&search_area=0"
},
{
"name": "简介",
"appendQueryString": "&search_area=1"
},
{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"appendQueryString": "&search_area=4"
}
],
"resultType": "html",
"parseScriptFile": "/schemas/NexusPHP/getSearchResult.js",
"resultSelector": "table.torrents:last"
},
"searchEntry": [
{
"name": "全部",
"enabled": true
}
],
"checker": {
"isLogin": {
"page": "/usercp.php",
"contains": "logout.php"
}
},
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": [
"a[href*='userdetails.php'][class*='Name']:first",
"a[href*='userdetails.php']:first"
],
"attribute": "href",
"filters": [
"query ? query.getQueryString('id'):''"
]
},
"name": {
"selector": [
"a[href*='userdetails.php'][class*='Name']:first",
"a[href*='userdetails.php']:first"
],
"filters": [
"query && query.attr('href').getQueryString('id') > 0 ? query.text(): ''"
]
},
"isLogged": {
"selector": [
"a[href*='usercp.php']"
],
"filters": [
"query.length>0"
]
},
"messageCount": {
"selector": [
"td[style*='background: red'] a[href*='messages.php']"
],
"filters": [
"query.text().match(/(\\d+)/)",
"(query && query.length>=2)?parseInt(query[1]):0"
]
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": [
"td.rowhead:contains('传输') + td",
"td.rowhead:contains('傳送') + td",
"td.rowhead:contains('Transfers') + td",
"td.rowfollow:contains('分享率')"
],
"filters": [
"query.text().replace(/,/g,'').match(/(上[传傳]量|Uploaded).+?([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length==3)?(query[2]).sizeToNumber():0"
]
},
"downloaded": {
"selector": [
"td.rowhead:contains('传输') + td",
"td.rowhead:contains('傳送') + td",
"td.rowhead:contains('Transfers') + td",
"td.rowfollow:contains('分享率')"
],
"filters": [
"query.text().replace(/,/g,'').match(/(下[载載]量|Downloaded).+?([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length==3)?(query[2]).sizeToNumber():0"
]
},
"levelName": {
"selector": [
"td.rowhead:contains('等级')",
"td.rowhead:contains('等級')",
"td.rowhead:contains('Class')"
],
"filters": [
"query.next().find('img').attr('title')"
]
},
"bonus": {
"selector": [
"td.rowhead:contains('魔力') + td",
"td.rowhead:contains('Karma'):contains('Points') + td",
"td.rowhead:contains('麦粒') + td",
"td.rowfollow:contains('魔力值')",
"td.rowhead:contains('bonus') + td"
],
"filters": [
"query.is(\":contains('魔力值:')\")||query.is(\":contains('Bonus Points:')\")?query.text().replace(/,/g,'').match(/(?:魔力值|Bonus Points).+?([\\d.]+)/)[1]:query.text().replace(/,/g,'')",
"parseFloat(query)"
]
},
"seedingPoints": {
"selector": [
"td.rowhead:contains('做种积分') + td",
"td.rowhead:contains('Seeding Points') + td",
"td.rowhead:contains('做種積分') + td",
"td.rowhead:contains('保种积分') + td",
"td.rowfollow:contains('做种积分')",
"td.rowfollow:contains('Seeding Points')",
"td.rowfollow:contains('做種積分')"
],
"filters": [
"query.text().replace(/,/g,'')",
"query.includes('做种积分') || query.includes('做種積分') || query.includes('Seeding Points') ? query.match(/(做种积分|做種積分|Seeding Points).+?[\\d.]+/g)[0] : query",
"query ? parseFloat(query.match(/[\\d.]+/)[0]) : null"
]
},
"joinTime": {
"selector": [
"td.rowhead:contains('加入日期')",
"td.rowhead:contains('Join'):contains('date')"
],
"filters": [
"query.next().text().split(' (')[0].trim()",
"dateTime(query).isValid()?dateTime(query).valueOf():query"
]
}
}
},
"bonusExtendInfo": {
"prerequisites": "!user.bonusPerHour",
"page": "/mybonus.php",
"fields": {
"bonusPerHour": {
"selector": [
"div:contains('你当前每小时能获取'):last",
"div:contains('You are currently getting'):last",
"div:contains('你當前每小時能獲取'):last"
],
"filters": [
"parseFloat(query.text().match(/[\\d.]+/)[0])"
]
}
}
},
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/dajiao.cyou/config.json
================================================
{
"name": "打胶 ",
"timezoneOffset": "+0800",
"description": "打胶",
"url": "https://dajiao.cyou/",
"icon": "https://dajiao.cyou/favicon.ico",
"tags": [],
"schema": "NexusPHP",
"host": "dajiao.cyou",
"collaborator": [
"IITII"
],
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"seedingPoints": "100000",
"privilege": "得到一个邀请名额;可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"seedingPoints": "200000",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"seedingPoints": "350000",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"seedingPoints": "600000",
"privilege": "可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"seedingPoints": "1000000",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"seedingPoints": "1500000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"seedingPoints": "2000000",
"privilege": "得到五个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"seedingPoints": "2500000",
"privilege": "得到十个邀请名额。"
}
],
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/dicmusic.com/config.json
================================================
{
"name": "DIC",
"timezoneOffset": "+0800",
"description": "music",
"url": "https://dicmusic.com/",
"icon": "https://dicmusic.com/favicon.ico",
"tags": ["音乐"],
"schema": "GazelleJSONAPI",
"host": "dicmusic.com",
"cdn": ["https://dicmusic.club/", "https://dicmusic.com/"],
"formerHosts": [
"dicmusic.club"
],
"levelRequirements": [
{
"level": 1,
"name": "Member",
"uploaded": "10GB",
"ratio": "0.7",
"interval": "1",
"privilege": "发起求种;查看部分排行榜;完全访问「茶话会」版块"
},
{
"level": 2,
"name": "Power User",
"uploaded": "25GB",
"ratio": "1.05",
"interval": "2",
"uploads": "5",
"privilege": "免疫账号不活跃;发送邀请,赠送1枚永久邀请;佩戴1枚印记;创建1个私人合集;访问「求邀区」「发邀区」「Power User」版块;完全访问排行榜"
},
{
"level": 3,
"name": "Elite",
"uploaded": "75GB",
"ratio": "1.05",
"interval": "4",
"uploads": "50",
"privilege": "赠送1枚永久邀请;佩戴2枚印记;创建2个私人合集;访问「Elite」版块;检查自己的种子;编辑所有种子;购买「自定义头衔(不允许 BBCode)」"
},
{
"level": 4,
"name": "Torrent Master",
"uploaded": "200GB",
"ratio": "1.05",
"interval": "8",
"uploads": "150",
"privilege": "赠送2枚永久邀请;每月1枚临时邀请;佩戴3枚印记;创建3个私人合集;访问「Torrent Master」版块"
},
{
"level": 5,
"name": "Power Torrent Master",
"uploaded": "375GB",
"ratio": "1.05",
"interval": "8",
"uniqueGroups": "300",
"privilege": "赠送2枚永久邀请;每月2枚临时邀请;佩戴4枚印记;创建4个私人合集;检查所有种子"
},
{
"level": 6,
"name": "Elite Torrent Master",
"uploaded": "600GB",
"ratio": "1.05",
"interval": "12",
"perfectFLAC": "500",
"privilege": "赠送3枚永久邀请;每月3枚临时邀请;无发邀间隔;佩戴5枚印记;创建5个私人合集;访问「Elite Torrent Master」版块"
},
{
"level": 7,
"name": "Elite Torrent Master Plus",
"uploaded": "600GB",
"ratio": "1.05",
"interval": "12",
"perfectFLAC": "500",
"privilege": "赠送3枚永久邀请;每月3枚临时邀请;购买「自定义头衔(允许 BBCode)」"
},
{
"level": 8,
"name": "Guru",
"uploaded": "1.2TB",
"ratio": "1.05",
"interval": "16",
"perfectFLAC": "1000",
"privilege": "拥有无限邀请;佩戴6枚印记;创建6个私人合集;访问「Guru」版块;查看种子检查日志"
}
],
"collaborator": [
"ylxb2016",
"enigmaz",
"amorphobia"
],
"searchEntryConfig": {
"skipIMDbId": true
},
"selectors": {
"userExtendInfo": {
"merge": true,
"page": "/ajax.php?action=user&id=$user.id$",
"fields": {
"perfectFLAC": {
"selector": ["response.community.perfectFlacs"]
}
}
},
"userSeedingTorrents": {
"page": "/bonus.php?action=bprates",
"fields": {
"seedingSize": {
"selector": ["table#bprates_overview > tbody > tr > td:eq(1)"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
},
"bonus": {
"selector": ["div#content > div.header > h3"],
"filters": ["query.text().replace(/,/g,'').match(/.+?([\\d.]+)/)", "(query && query.length>=2)?query[1]:null"]
},
"bonusPerHour": {
"selector": ["table#bprates_overview > tbody > tr > td:eq(2)"],
"filters": ["parseFloat(query.text().match(/[\\d.]+/)[0])"]
}
}
}
},
"supportedFeatures": {
"imdbSearch": false
}
}
================================================
FILE: resource/sites/discfan.net/config.json
================================================
{
"name": "DiscFan",
"timezoneOffset": "+0800",
"description": "DiscFan",
"url": "https://discfan.net/",
"icon": "https://discfan.net/favicon.ico",
"tags": ["影视", "港片"],
"schema": "NexusPHP",
"host": "discfan.net",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"privilege": "得到一个邀请名额;可以直接发布种子;可以检视NFO文件;可以检视用户清单;可以要求续种;可以传送邀请;可以检视排行榜;可以检视其他用户的种子历史(如果用户隐私等级未设定为\"强\");可以移除自己上传的字幕。"
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"privilege": "Elite User及以上用户封存账号后不会被移除。"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选取匿名型态。"
},{
"level": "4",
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"privilege": "可以检视普通日志。"
},{
"level": "5",
"name": "Veteran User",
"interval": "40",
"downloaded": "700GB",
"ratio": "3.05",
"privilege": "得到三个邀请名额;可以检视其他用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},{
"level": "6",
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"privilege": "可以更新过期的外部资讯;可以检视Extreme User论坛。"
},{
"level": "7",
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"privilege": "得到五个邀请名额。"
},{
"level": "8",
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"privilege": "得到十个邀请名额。"
}],
"formerHosts": [
"pt.gztown.net"
],
"categories": [{
"entry": "*",
"result": "&cat$id$=1",
"category": [{
"id": 401,
"name": "中国大陆"
}, {
"id": 404,
"name": "中国香港特别行政区"
}, {
"id": 405,
"name": "中国台湾省"
}, {
"id": 402,
"name": "泰国"
}, {
"id": 403,
"name": "日本"
}, {
"id": 406,
"name": "韩国"
}, {
"id": 410,
"name": "世界"
}, {
"id": 411,
"name": "剧集"
}, {
"id": 414,
"name": "音乐"
}, {
"id": 413,
"name": "记录"
}, {
"id": 416,
"name": "综艺"
}, {
"id": 417,
"name": "体育"
}]
}],
"supportedFeatures": {
"imdbSearch": false
}
}
================================================
FILE: resource/sites/et8.org/config.json
================================================
{
"name": "TorrentCCF",
"timezoneOffset": "+0800",
"description": "兼有学习资源和软件资源的影视PT站点",
"url": "https://et8.org/",
"icon": "https://et8.org/favicon.ico",
"tags": [
"影视",
"学习",
"综合"
],
"schema": "NexusPHP",
"host": "et8.org",
"collaborator": ["Rhilip", "cnsunyour"],
"levelRequirements": [{
"level": "1",
"name": "士官(Power User)",
"interval": "2",
"downloaded": "64GB",
"ratio": "1.05",
"privilege": "可以上传种子; 可以删除自己上传的字幕; 可以在做种/下载/上传的时候选择匿名模式."
},{
"level": "2",
"name": "尉官(Elite User)",
"interval": "6",
"downloaded": "128GB",
"ratio": "1.55",
"privilege": "购买邀请; 可以查看邀请论坛; 可以查看NFO文档; 可以更新外部信息; 可以请求续种; 可以使用个性条."
},{
"level": "3",
"name": "少校(Crazy User)",
"interval": "14",
"downloaded": "256GB",
"ratio": "2.05",
"privilege": "可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\")."
},{
"level": "4",
"name": "中校(Insane User)",
"interval": "26",
"downloaded": "512GB",
"ratio": "2.55",
"privilege": "中校及以上用户Park后不会被删除帐号."
},{
"level": "5",
"name": "上校(Veteran User)",
"interval": "38",
"downloaded": "1TB",
"ratio": "3.05",
"privilege": "可以发送邀请; 上校及以上用户会永远保留账号."
},{
"level": "6",
"name": "少将(Extreme User)",
"interval": "54",
"downloaded": "2TB",
"ratio": "3.55",
"privilege": "可以查看种子文件结构."
},{
"level": "7",
"name": "中将(Ultimate User)",
"interval": "70",
"downloaded": "4TB",
"ratio": "4.05",
"privilege": "可以查看其它用户的评论、帖子历史;得到五个邀请名额."
},{
"level": "8",
"name": "上将(Nexus Master)",
"interval": "88",
"downloaded": "8TB",
"ratio": "4.55",
"privilege": "得到十个邀请名额。"
}],
"plugins": [{
"name": "小组专区",
"pages": ["/trls.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/NexusPHP/torrents.js"]
}],
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": [
"> td:eq(8)"
],
"filters": [
"query.text()==='-'?null:parseFloat(query.text().split('%')[0])"
]
},
"status": {
"selector": [
"> td:eq(8)"
],
"filters": [
"query.text()==='-'?null:(query.is(\"[bgcolor='#44cef6']\")?1:(parseFloat(query.text().split('%')[0])==100?(query.is(\"[bgcolor='#d0d0d0']\")?255:2):3))"
]
}
}
},
"searchEntry": [{
"name": "全站",
"enabled": true
},
{
"queryString": "cat622=1",
"name": "Movies.电影",
"enabled": false
},
{
"queryString": "cat623=1",
"name": "TV.电视剧",
"enabled": false
},
{
"queryString": "cat624=1",
"name": "Documentaries.纪录片",
"enabled": false
},
{
"queryString": "cat625=1",
"name": "Appz.软件",
"enabled": false
},
{
"queryString": "cat626=1",
"name": "Music&MusicVideos.音乐及MV",
"enabled": false
},
{
"queryString": "cat627=1",
"name": "Others.其他(非学习类)",
"enabled": false
},
{
"queryString": "cat628=1",
"name": "Elearning - 杂项学习",
"enabled": false
},
{
"queryString": "cat629=1",
"name": "Elearning - 电子书/小说",
"enabled": false
},
{
"queryString": "cat630=1",
"name": "Elearning - 电子书/非小说",
"enabled": false
},
{
"queryString": "cat631=1",
"name": "Elearning - 杂志",
"enabled": false
},
{
"queryString": "cat632=1",
"name": "Elearning - 漫画",
"enabled": false
},
{
"queryString": "cat633=1",
"name": "Elearning - 有声书",
"enabled": false
},
{
"queryString": "cat634=1",
"name": "Elearning - 公开课",
"enabled": false
},
{
"queryString": "cat635=1",
"name": "Elearning - 视频教程",
"enabled": false
}
],
"categories": [{
"entry": "torrents.php",
"result": "&cat$id$=1",
"category": [{
"id": 622,
"name": "Movies.电影"
},
{
"id": 623,
"name": "TV.电视剧"
},
{
"id": 624,
"name": "Documentaries.纪录片"
},
{
"id": 625,
"name": "Appz.软件"
},
{
"id": 626,
"name": "Music&MusicVideos.音乐及MV"
},
{
"id": 627,
"name": "Others.其他(非学习类)"
},
{
"id": 628,
"name": "Elearning - 杂项学习"
},
{
"id": 629,
"name": "Elearning - 电子书/小说"
},
{
"id": 630,
"name": "Elearning - 电子书/非小说"
},
{
"id": 631,
"name": "Elearning - 杂志"
},
{
"id": 632,
"name": "Elearning - 漫画"
},
{
"id": 633,
"name": "Elearning - 有声书"
},
{
"id": 634,
"name": "Elearning - 公开课"
},
{
"id": 635,
"name": "Elearning - 视频教程"
}
]
}]
}
================================================
FILE: resource/sites/extremlymtorrents.ws/config.json
================================================
{
"name": "XTR",
"timezoneOffset": "+0000",
"description": "extremlymtorrents",
"url": "https://extremlymtorrents.ws/",
"icon": "https://extremlymtorrents.ws/favicon.ico",
"tags": ["综合"],
"schema": "Common",
"host": "extremlymtorrents.ws",
"plugins": [{
"name": "种子详情页面",
"pages": ["/file.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/details.js"]
}, {
"name": "种子列表",
"pages": ["/torrents.php", "/torrents-search.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/torrents.js"]
}],
"searchEntryConfig": {
"page": "/torrents-search.php",
"resultType": "html",
"queryString": "search=$key$&cat=0&lang=0&sort=id&order=desc",
"parseScriptFile": "/schemas/Common/getSearchResult.js",
"resultSelector": "table.xtrz",
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"parseScript": "(payload && payload.en)?payload.en:key"
}],
"firstDataRowIndex": 1,
"fieldIndex": {
"title": 1,
"time": 8,
"size": 5,
"seeders": 6,
"leechers": 7,
"completed": -1,
"comments": -1,
"author": 3,
"category": 0,
"url": 2,
"link": 1
},
"loggedRegex": "account-logout\\.php",
"fieldSelector": {
"title": {
"selector": ["a:first > b"]
},
"url": {
"selector": ["a:first"],
"filters": ["query.attr('href')"]
},
"link": {
"selector": ["a:first"],
"filters": ["query.attr('href')"]
},
"time": {
"selector": [""],
"filters": ["query.text().replace(/(\\d{2}).(\\d{2}).(\\d{4})\\n?(\\d{2}:\\d{2}:\\d{2})/,'$3-$2-$1 $4')"]
},
"category": {
"selector": ["img:first"],
"filters": ["query.attr('alt')"]
}
}
},
"searchEntry": [{
"name": "all",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "img[title='Free Torrents']"
}, {
"name": "VIP",
"selector": "img[alt='Only VIP']"
}],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"id": {
"selector": ["a[href*='account-details.php']:first"],
"attribute": "href",
"filters": ["query ? query.getQueryString('id'):''"]
},
"name": {
"selector": ["a[href*='account-details.php']:first"],
"filters": ["query && query.attr('href').getQueryString('id') > 0 ? query.text(): ''"]
},
"isLogged": {
"selector": ["a[href*='account-logout.php']"],
"filters": ["query.length>0"]
}
}
},
"userExtendInfo": {
"page": "/account-details.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": ["td.ttable_col2:contains('Uploaded:') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["td.ttable_col2:contains('Downloaded:') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"levelName": {
"selector": "td.ttable_col2:contains('User Class:') + td"
},
"joinTime": {
"selector": "td.ttable_col2:contains('Joined:') + td",
"filters": ["query.text()", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
},
"seeding": {
"value": "N/A"
},
"seedingSize": {
"value": "N/A"
},
"bonus": {
"value": "N/A"
}
}
},
"/file.php": {
"fields": {
"size": {
"selector": ["extremlymsmall3"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"]
},
"downloadURL": {
"selector": ["a[href*='download.php']:first"],
"filters": ["query.attr('href')"]
},
"sayThanksButton": {
"selector": ["input[type=submit][value='Thanks!']"],
"filters": ["query"]
}
}
},
"/torrents.php": {
"fields": {
"downloadURLs": {
"selector": ["a[href*='download.php']"],
"filters": ["query.toArray()"]
},
"confirmSize": {
"selector": ["table.xtrz"],
"filters": ["query.find(\"td:contains('MB'),td:contains('GB'),td:contains('TB')\")"]
}
}
}
}
}
================================================
FILE: resource/sites/femdomcult.org/config.json
================================================
{
"name": "Femdomcult",
"timezoneOffset": "-1100",
"description": "成人",
"url": "https://femdomcult.org/",
"icon": "https://femdomcult.org/favicon.ico",
"tags": [
"成人"
],
"schema": "GazelleJSONAPI",
"host": "femdomcult.org",
"levelRequirements": [{
"level": "1",
"name": "",
"interval": "1",
"trueDownloaded": "5GB",
"ratio": "0",
"privilege": ""
},{
"level": "2",
"name": "",
"interval": "2",
"trueDownloaded": "10GB",
"ratio": "0.1",
"privilege": ""
},{
"level": "3",
"name": "",
"interval": "3",
"trueDownloaded": "20GB",
"ratio": "0.15",
"privilege": ""
},{
"level": "4",
"name": "",
"interval": "4",
"trueDownloaded": "30GB",
"ratio": "0.2",
"privilege": ""
},{
"level": "5",
"name": "",
"interval": "5",
"trueDownloaded": "40GB",
"ratio": "0.3",
"privilege": ""
},{
"level": "6",
"name": "",
"interval": "6",
"trueDownloaded": "50GB",
"ratio": "0.4",
"privilege": ""
},{
"level": "7",
"name": "Guru",
"interval": "7",
"trueDownloaded": "60GB",
"ratio": "0.5",
"privilege": ""
}
],
"collaborator": [
"RichardHu"
],
"searchEntryConfig": {
"page": "/ajax.php",
"resultType": "json",
"parseScriptFile": "getSearchResult.js",
"asyncParse": true,
"queryString": "action=browse&searchstr=$key$"
},
"searchEntry": [{
"name": "全部",
"enabled": true
}],
"selectors": {
"userBaseInfo": {
"page": "/ajax.php?action=index",
"dataType": "json",
"fields": {
"id": {
"selector": ["response.id"]
},
"name": {
"selector": ["response.username"]
},
"uploaded": {
"selector": ["response.userstats.uploaded"]
},
"downloaded": {
"selector": ["response.userstats.downloaded"]
},
"ratio": {
"selector": ["response.userstats.ratio"]
},
"levelName": {
"selector": ["response.userstats.class"]
}
}
}
}
}
================================================
FILE: resource/sites/femdomcult.org/getSearchResult.js
================================================
(function(options) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/auth_form/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
this.haveData = true;
this.authkey = "";
this.passkey = "";
}
start() {
this.getAuthKey()
.then(() => {
options.resolve(this.getResult());
})
.catch(() => {
options.reject({
success: false,
msg: options.searcher.getErrorMessage(
options.site,
ESearchResultParseStatus.parseError,
options.errorMsg
),
data: {
site: options.site,
isLogged: options.isLogged
}
});
});
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let site = options.site;
let groups = options.page.response.results;
if (groups.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
return [];
}
let results = [];
let authkey = this.authkey;
let passkey = this.passkey;
console.log("groups.length", groups.length);
try {
groups.forEach(group => {
if (group.hasOwnProperty("torrents")) {
let torrents = group.torrents;
torrents.forEach(torrent => {
let data = {
id: torrent.torrentId,
title:
group.groupName +
" - " +
group.groupSubName +
" [" +
group.groupYear +
"] [" +
group.releaseType +
"]",
subTitle:
torrent.codec +
" / " +
torrent.source +
" / " +
torrent.resolution +
" / " +
torrent.container +
" / " +
torrent.processing +
(torrent.remasterTitle ? ` / ${torrent.remasterTitle}` : "") +
(torrent.scene ? " / Scene" : "") +
(torrent.isFreeleech ||
torrent.isNeutralLeech ||
torrent.isPersonalFreeleech
? " / Freeleech"
: "") +
(torrent.releaseGroup ? ` / ${torrent.releaseGroup}` : ""),
link: `${site.url}torrents.php?id=${group.groupId}&torrentid=${torrent.torrentId}`,
url: `${site.url}torrents.php?action=download&id=${torrent.torrentId}&authkey=${authkey}&torrent_pass=${passkey}`,
size: parseFloat(torrent.size),
time: torrent.time,
seeders: torrent.seeders,
leechers: torrent.leechers,
completed: torrent.snatches,
site: site,
entryName: options.entry.name,
category: group.releaseType,
imdbId: group.imdbId,
};
results.push(data);
});
} else {
let data = {
title: group.groupName,
link: `${site.url}torrents.php?id=${group.groupId}&torrentid=${group.torrentId}`,
url: `${site.url}torrents.php?action=download&id=${group.torrentId}&authkey=${authkey}&torrent_pass=${passkey}`,
size: parseFloat(group.size),
time: group.groupTime,
author: "",
seeders: group.seeders,
leechers: group.leechers,
completed: group.snatches,
comments: 0,
site: site,
tags: group.tags,
entryName: options.entry.name,
category: group.category,
imdbId: group.imdbId,
};
results.push(data);
}
});
console.log("results.length", results.length);
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
}
} catch (error) {
console.log(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack;
}
return results;
}
/**
* 获取 AuthKey ,用于组合完整的下载链接
*/
getAuthKey() {
const url = (options.site.activeURL + "/ajax.php?action=index")
.replace("://", "****")
.replace(/\/\//g, "/")
.replace("****", "://");
return new Promise((resolve, reject) => {
$.get(url)
.done(result => {
if (result && result.status === "success" && result.response) {
this.authkey = result.response.authkey;
this.passkey = result.response.passkey;
resolve();
} else {
reject();
}
})
.fail(() => {
reject();
});
});
}
}
let parser = new Parser(options);
parser.start();
})(options);
================================================
FILE: resource/sites/filelist.io/browse.js
================================================
(function ($) {
console.log("this is browse.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons(false);
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
let links = $("a[href*='download'][onclick!='return show_confirm();']").toArray();
let urls = $.map(links, (item) => {
let link = $(item).attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${siteURL}${link}`+(PTService.site.passkey ? "&passkey=" + PTService.site.passkey : "");
}
return link;
});
if (links.length == 0) {
return "获取下载链接失败,未能正确定位到链接";
}
return urls;
}
getDownloadURL(id) {
return `https://${PTService.site.host}/download.php?id=${id}`+(PTService.site.passkey ? "&passkey=" + PTService.site.passkey : "");
}
/**
* 执行指定的操作
* @param {*} action 需要执行的执令
* @param {*} data 附加数据
* @return Promise
*/
call(action, data) {
return new Promise((resolve, reject) => {
switch (action) {
// 从当前的DOM中获取下载链接地址
case PTService.action.downloadFromDroper:
this.downloadFromDroper(data, () => {
resolve()
});
break;
}
});
}
/**
* 下载拖放的种子
* @param {*} data
* @param {*} callback
*/
downloadFromDroper(data, callback) {
if (typeof data === "string") {
data = {
url: data,
title: ""
};
}
let id = data.url.getQueryString("id");
let result = this.getDownloadURL(id);
if (!result) {
callback();
return;
}
this.sendTorrentToDefaultClient(result).then((result) => {
callback(result);
}).catch((result) => {
callback(result);
});
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize($("div.visitedlinks").find("div[class='torrenttable']:contains('MB'),div[class='torrenttable']:contains('GB'),div[class='torrenttable']:contains('TB')"));
}
}
(new App()).init();
})(jQuery);
================================================
FILE: resource/sites/filelist.io/config.json
================================================
{
"name": "FileList",
"timezoneOffset": "+0000",
"description": "FileList",
"url": "https://filelist.io/",
"icon": "https://filelist.io/favicon.ico",
"tags": ["影视", "综合"],
"schema": "FileList",
"plugins": [{
"name": "种子详情页面",
"pages": ["^/t/(\\d+)/$", "/details.php"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["/browse.php"],
"scripts": ["/schemas/NexusPHP/common.js", "browse.js"]
}],
"host": "filelist.io",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"uploaded": "25GB",
"ratio": "1.05",
"privilege": "It can download DOX files larger than 1MB. This class has the right to apply to uploader status."
},
{
"level": 2,
"name": "Addict",
"interval": "26",
"uploaded": "500GB",
"ratio": "4.00",
"privilege": "This class has the right to request a Custom Title. This class is entitled to requests."
},
{
"level": 3,
"name": "Elite",
"interval": "209",
"uploaded": "4TB",
"ratio": "5.00",
"privilege": "This class gives you the right to give reputation to other users."
}
],
"searchEntryConfig": {
"page": "/browse.php",
"queryString": "search=$key$&cat=0&searchin=1&sort=2",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "div.visitedlinks:last > div[class=torrentrow]"
},
"searchEntry": [{
"name": "All",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "img[alt='FreeLeech']"
}],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": "a[href*='userdetails.php']:first",
"attribute": "href",
"filters": ["query ? query.getQueryString('id'):''"]
},
"name": {
"selector": "a[href*='userdetails.php']:eq(1)"
},
"isLogged": {
"selector": ["a[href*='logout.php']"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": [".alert a[href*='messages.php']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
},
"bonus": {
"selector": ["a[href='/shop.php']"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+)/)", "(query && query.length>=2)?query[1]:''"]
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": ["td.colhead:contains('Uploaded') + td"],
"filters": ["query.text().replace(/,/g,'').sizeToNumber()"]
},
"downloaded": {
"selector": ["td.colhead:contains('Downloaded') + td"],
"filters": ["query.text().replace(/,/g,'').sizeToNumber()"]
},
"ratio": {
"selector": "td.colhead:contains('Share ratio') + td",
"filters": ["parseFloat(query.text())"]
},
"levelName": {
"selector": ["td.colhead:contains('Class') + td"]
},
"joinTime": {
"selector": ["td.colhead:contains('Join'):contains('date') + td"],
"filters": ["query.text().split(' (')[0]", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
},
"seeding": {
"selector": ["td.colhead:contains('Seed'):contains('bonus') + td > div > b"],
"filters": ["query.first().text().match(/([\\d.]+)/)", "(query && query.length>=1)?query[0]:''"]
},
"seedingSize": {
"selector": ["td.colhead:contains('Seed'):contains('bonus') + td > div > b:nth-child(2)"],
"filters": ["query.last().text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
}
}
},
"bonusExtendInfo": {
"prerequisites": "!user.bonusPerHour",
"page": "/userdetails.php?id=$user.id$",
"fields": {
"bonusPerHour": {
"selector": ["td.colhead:contains('Seed'):contains('bonus') + td > div:eq(2) > b"],
"filters": ["parseFloat(query.text().match(/[\\d.]+/)[0])"]
}
}
}
}
}
================================================
FILE: resource/sites/filelist.io/details.js
================================================
(function ($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.showTorrentSize();
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
let query = $("a[href*='download.php'][onclick!='return show_confirm();']");
let url = "";
if (query.length > 0) {
url = query.attr("href");
// 直接获取的链接下载成功率很低
// 如果设置了 passkey 则使用 rss 订阅的方式下载
if (PTService.site.passkey) {
let id = url.getQueryString("id");
url = `https://${PTService.site.host}/download.php?id=${id}`+"&passkey=" + PTService.site.passkey;
}
if (url && url.substr(0, 4) !== "http") {
url = `${siteURL}${url}`;
}
}
return url;
}
showTorrentSize() {
let query = $("div[style='width:25%;float:left;']:contains('Last activity')");
let size = "";
if (query.length > 0) {
size = query.text().replace("Size","").replace(/[\r\n]/g,"").replace(/Files(.*)/,"");
// attachment
PTService.addButton({
title: "当前种子大小",
icon: "attachment",
label: size
});
}
}
getTitle() {
let query = $("div.cblock-header");
return query ? query.text(): "";
}
};
(new App()).init();
})(jQuery, window);
================================================
FILE: resource/sites/filelist.io/getSearchResult.js
================================================
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
if (/takelogin\.php/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
if (
/没有种子|No [Tt]orrents?|Your search did not match anything|用准确的关键字重试/.test(
options.responseText
)
) {
options.status = ESearchResultParseStatus.noTorrents;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let results = [];
let site = options.site;
// 获取种子列表行
let rows = options.page.find(
options.resultSelector ||
"div.visitedlinks:last > div[class=torrentrow]"
);
let time_regex = /(\d{2}:\d{2}:\d{2}[^\d]+?\d{2}\/\d{2}\/\d{4})/;
let time_regen_replace1 = /(\d{2}:\d{2}:\d{2})[^\d]+?(\d{2}\/\d{2}\/\d{4})/;
let time_regen_replace2 = /(\d{2})\/(\d{2})\/(\d{4})/;
// 用于定位每个字段所列的位置
let fieldIndex = {
//title
title: 1,
//downloadlink
downloadlink: 3,
// 时间
time: 5,
// 大小
size: 6,
// 上传人数
seeders: 8,
// 下载人数
leechers: 9,
// 完成人数
completed: 7,
// 评论人数
comments: 4,
// 发布人
author: 10,
category: 0
};
if (site.url.substr(-1) == "/") {
site.url = site.url.substr(0, site.url.length - 1);
}
// 遍历数据行
for (let index = 0; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">div");
let titleStrings = cells
.eq(fieldIndex.title)
.find("a")
.attr("title");
let title = cells
.eq(fieldIndex.title)
.find("a")
.first();
if (title.length == 0) {
continue;
}
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}/${link}`;
}
let id = link.getQueryString("id");
let url = "";
if (site.passkey && id) {
url = `https://${site.host}/download.php?id=${id}&passkey=${site.passkey}`;
} else {
url = cells
.eq(fieldIndex.downloadlink)
.find("a")
.first()
.attr("href");
if (url && url.substr(0, 4) !== "http") {
url = `${site.url}/${url}`;
}
}
if (!url) {
continue;
}
let subTitle = "";
let data = {
title: $("")
.html(titleStrings)
.text(),
subTitle: subTitle || "",
link,
url: url,
size: cells.eq(fieldIndex.size).text() || 0,
time: cells
.eq(fieldIndex.time)
.html()
.replace(" ", " ")
.match(time_regex)[1]
.replace(time_regen_replace1, "$2 $1")
.replace(time_regen_replace2, "$3-$2-$1"),
author: cells.eq(fieldIndex.author).text() || "",
seeders:
cells
.eq(fieldIndex.seeders)
.text()
.split("/")[0] || 0,
leechers:
cells
.eq(fieldIndex.leechers)
.text()
.split("/")[1] || 0,
completed: cells.eq(fieldIndex.completed).text() || 0,
comments: cells.eq(fieldIndex.comments).text() || 0,
site: site,
entryName: options.entry.name,
category: this.getCategory(cells.eq(fieldIndex.category)),
tags: Searcher.getRowTags(site, row)
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
}
return results;
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: "",
link: ""
};
let link = cell.find("a:first");
let img = link.find("img:first");
result.link = link.attr("href");
if (result.link.substr(0, 4) !== "http") {
result.link = options.site.url + result.link;
}
result.name = img.attr("alt");
return result;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/sites/fsm.name/config.json
================================================
{
"name": "FSM",
"timezoneOffset": "+0800",
"description": "飞天拉面神教 - FSM",
"url": "https://fsm.name/",
"tags": [ "成人" ],
"schema": "Common",
"host": "fsm.name",
"formerHosts": [
"nextpt.net"
],
"collaborator": [
"Ted423",
"IITII"
],
"plugins": [
{
"name": "种子详情页面",
"pages": [ "/Torrents/details" ],
"scripts": [ "/schemas/NexusPHP/common.js", "/schemas/Common/details.js" ]
},
{
"name": "种子列表",
"pages": [ "/Torrents$" ],
"scripts": [ "/schemas/NexusPHP/common.js", "/schemas/Common/torrents.js" ]
}
],
"searchEntryConfig": {
"skipIMDbId": true,
"page": "/Torrents?type=0&systematics=0&keyword=$key$",
"loggedRegex": "container-fluid",
"resultType": "html",
"resultSelector": "table",
"fieldIndex": {
"category": 0,
"title": 2,
"link": 2,
"url": 3,
"comments": 4,
"time": 5,
"size": 6,
"seeders": 7,
"leechers": 8,
"completed": 9
},
"fieldSelector": {
"title": {
"selector": [ "a[href*='/Torrents/details']" ],
"filters": [ "query" ]
},
"url": {
"selector": [ "a[href*='/Torrents/download?passkey=']" ],
"filters": [ "query.attr('href')", "'https://fsm.name'+query" ]
},
"progress": {
"selector": [ ".progress-bar.progress-bar-success", ".progress-bar.progress-bar-info,.progress-bar.progress-bar-danger", "" ],
"switchFilters": [
[ "100" ],
[ "query.attr('style').replace('width: ','').replace('%;','')" ],
[ "null" ]
]
},
"status": {
"selector": [ ".progress-bar.progress-bar-success", ".progress-bar.progress-bar-info", ".progress-bar.progress-bar-danger" ],
"switchFilters": [
[ "2" ],
[ "1" ],
[ "3" ]
]
}
}
},
"selectors": {
"userBaseInfo": {
"page": "/Rules",
"fields": {
"isLogged": {
"selector": [ "a.adminUser" ],
"filters": [ "query.length>0" ]
},
"name": {
"selector": [ "#header-navbar .dropdown-toggle" ],
"filters": [ "query.text().trim().replace(/工具\\s?/,'')" ]
},
"id": {
"selector": [ "a[href*='/Users/profile']" ],
"attribute": "href",
"filters": [ "query ? query.getQueryString('uid'):''" ]
},
"messageCount": {
"selector": [ "a[href='/Mail']" ],
"filters": [ "query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0" ]
},
"uploaded": {
"selector": [ "#data-upload" ],
"filters": [ "query.text().replace(/,/g,'').replace('上传量:','').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null" ]
},
"downloaded": {
"selector": [ "#data-download" ],
"filters": [ "query.text().replace(/,/g,'').replace('下载量:','').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null" ]
},
"seeding": {
"selector": [ "#data-now-seed" ],
"filters": [ "query.text().replace(/当前上传[::]/,'')" ]
}
}
},
"userExtendInfo": {
"page": "/Users/profile?uid=$user.id$",
"fields": {
"comment": "暂不获取的数据置 0",
"bonusPerHour": {"value":"0"},
"joinTime": {
"selector": [ "th:contains('加入时间') + td" ],
"filters": [ "dateTime(query.text().trim()).isValid()?dateTime(query.text().trim()).valueOf():query.text().trim()"]
},
"levelName": {
"selector": [ "a[href*='/Users/profile'][class*='User']" ],
"filters": [ "query.attr('class').replace(/[^ ]*\\s/,'').replace(/User.*/,'').toUpperCase()"]
},
"bonus": {
"selector": [ "#data-seedGH" ],
"filters": [ "query.text()" ]
}
}
},
"userSeedingTorrents": {
"page": "/Torrents/mySeed",
"fields": {
"seedingSize": {
"selector": ".panel-primary .panel-body td(6)",
"filters": [
"(query != 0) ? query.sizeToNumber() : 0",
"query.text()"
]
}
}
},
"common": {
"page": "/Torrents",
"fields": {
"downloadURL": {
"selector": [ "a[href*='/Torrents/download']" ],
"filters": [ "query.attr('href')" ]
},
"size": {
"selector": [ "div.visible-xs:contains('种子大小') + div" ],
"filters": [ "query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0" ]
},
"downloadURLs": {
"selector": [ "a[href*='/Torrents/download']" ],
"filters": [ "query.toArray()" ]
},
"confirmSize": {
"selector": [ "table.table.table-bordered > tbody td.center.tdCenter > div:contains('B')" ],
"filters": [ "query" ]
}
}
}
}
}
================================================
FILE: resource/sites/gainbound.net/config.json
================================================
{
"name": "丐帮",
"description": "降龙掌青竹杖 美酒佳肴来作伴",
"url": "https://gainbound.net/",
"icon": "https://gainbound.net/favicon.ico",
"tags": ["高清","电影","纪录片"],
"schema": "NexusPHP",
"host": "gainbound.net",
"levelRequirements":[
{
"level": 1,
"name": "Power User",
"interval": "5",
"downloaded": "50GB",
"ratio": "1.05",
"seedingPoints": "40000",
"privilege": "得到3个邀请名额;可以查看邀请区;可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "10",
"downloaded": "120GB",
"ratio": "1.55",
"seedingPoints": "80000",
"privilege": "得到1个邀请名额,三袋弟子及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"seedingPoints": "150000",
"privilege": "得到2个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"seedingPoints": "250000",
"privilege": "得到1个邀请名额,可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"seedingPoints": "400000",
"privilege": "得到3个邀请名额;可以查看其它用户的评论、帖子历史。六袋长老及以上用户会永远保留账号。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"seedingPoints": "600000",
"privilege": "得到1个邀请名额,可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"seedingPoints": "800000",
"privilege": "得到3个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"seedingPoints": "1000000",
"privilege": "得到5个邀请名额。"
}
],
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
},
"patterns": {
"torrentLinks": ["*://*/*"]
},
"parser": {
"downloadURL": "解析脚本内容"
},
"torrentTagSelectors": [
{
"name": "Free",
"selector": "img.pro_free",
"color": "blue"
}
],
"categories": [
{
"entry": "*",
"result": "cat$id$=1",
"category": [
{
"id": 401,
"name": "电影"
},
{
"id": 404,
"name": "记录片"
},
{
"id": 410,
"name": "港台剧"
},
{
"id": 406,
"name": "演唱会"
}
]
}
]
}
================================================
FILE: resource/sites/gay-torrents.org/config.json
================================================
{
"name": "GTorg",
"url": "https://gay-torrents.org/",
"cdn": ["https://gay-torrents.se/", "https://gay-area.org/"],
"icon": "https://gay-torrents.org/favicon.ico",
"tags": ["影视", "成人", "综合"],
"schema": "GTorg",
"host": "gay-torrents.org",
"collaborator": "davidxuang",
"levelRequirements": [
{
"level": 1,
"name": "PowerUser",
"uploaded": "50 GB",
"ratio": "1.05",
"privilege": "Access to online users and tracker info"
},
{
"level": 2,
"name": "ExtraUser",
"uploaded": "250 GB",
"ratio": "2.00",
"privilege": "Access to online users, tracker info, requests, top 10 and users"
}
],
"searchEntryConfig": {
"page": "/torrents_beta.php",
"queryString": "search=$key$&active=0&options=1",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": ".torrentsContainer"
},
"searchEntry": [
{
"name": "all",
"enabled": false
},
{
"name": "misc",
"appendQueryString": "&category[]=17&category[]=31&category[]=49&category[]=41",
"enabled": true
},
{
"name": "Non-Porn",
"appendQueryString": "&category[]=41",
"enabled": false
},
{
"name": "Porn",
"appendQueryString": "&category[]=15&category[]=16&category[]=42&category[]=18&category[]=19&category[]=20&category[]=22&category[]=21&category[]=23&category[]=25&category[]=51&category[]=71&category[]=27&category[]=28&category[]=30&category[]=52&category[]=68&category[]=32&category[]=50&category[]=33&category[]=34&category[]=40&category[]=35&category[]=36&category[]=37&category[]=38&category[]=39",
"enabled": false
}
],
"torrentTagSelectors": [
{
"name": "Free",
"selector": ".specsIn.Freee[title~='0%']",
"color": "blue"
},
{
"name": "50%",
"selector": ".specsIn.Freee[title~='50%']",
"color": "orange"
},
{
"name": "75%",
"selector": ".specsIn.Freee[title~='75%']",
"color": "lime darken-3"
},
{
"name": "Bumped",
"selector": ".specsIn.Bump",
"color": "grey"
}
],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": "#my_menu > ul > li:first-child > a",
"attribute": "href",
"filters": ["query ? query.getQueryString('uid') : ''"]
},
"name": {
"selector": "#user_info li:has(i[title='Username'])",
"filters": ["query ? query.text().match(/\\s*(.+?)\\s*\\(/)[1] : ''"]
},
"bonus": {
"selector": "#user_info li:has(i[title~='Bonus'])",
"filters": ["query ? query.text().match(/[\\d.]+/)[0] : 0"]
},
"seeding": {
"selector": "#user_info span[title='Seed']"
},
"messageCount": {
"selector": "#my_menu > ul > li:contains('Mailbox') > span"
}
}
},
"userExtendInfo": {
"page": "/usercp.php?uid=$user.id$",
"fields": {
"name": {
"selector": ".simple_table.full_widths.left_column td:contains('User') + td"
},
"levelName": {
"selector": ".simple_table.full_widths.left_column td:contains('Rank') + td"
},
"uploaded": {
"selector": ".simple_table.full_widths.left_column td:contains('Uploaded') + td",
"filters": ["query.text().sizeToNumber()"]
},
"downloaded": {
"selector": ".simple_table.full_widths.left_column td:contains('Downloaded') + td",
"filters": ["query.text().sizeToNumber()"]
},
"joinTime": {
"selector": ".simple_table.full_widths.left_column td:contains('Joined') + td",
"filters": ["dateTime(query.text().replace(/(\\d{2})\\/(\\d{2})\\/(\\d{4})/,'$3-$2-$1')).valueOf()"]
}
}
}
},
"categories": [
{
"entry": "*",
"result": "&category[]=$id$",
"category": [
{ "id": "15", "name": "Amateur" },
{ "id": "16", "name": "Anal" },
{ "id": "42", "name": "Animation" },
{ "id": "18", "name": "Asian" },
{ "id": "19", "name": "Bareback" },
{ "id": "20", "name": "Bears" },
{ "id": "22", "name": "Bisexual" },
{ "id": "21", "name": "Black" },
{ "id": "23", "name": "Chubs" },
{ "id": "25", "name": "Cross Generation" },
{ "id": "51", "name": "Doctor/Medical" },
{ "id": "71", "name": "Fan Sites" },
{ "id": "27", "name": "Fetish" },
{ "id": "28", "name": "Group Sex" },
{ "id": "30", "name": "Hunks" },
{ "id": "52", "name": "Interracial" },
{ "id": "68", "name": "Homo Erotic" },
{ "id": "32", "name": "Latino" },
{ "id": "50", "name": "Middle Eastern" },
{ "id": "33", "name": "Military" },
{ "id": "34", "name": "Oral-Sex" },
{ "id": "40", "name": "Other" },
{ "id": "35", "name": "Solo" },
{ "id": "36", "name": "Trans" },
{ "id": "37", "name": "Twinks" },
{ "id": "38", "name": "Vintage" },
{ "id": "39", "name": "Wrestling" },
{ "id": "17", "name": "Applications" },
{ "id": "31", "name": "Images" },
{ "id": "49", "name": "Books" },
{ "id": "41", "name": "Non-Porn" }
]
}
]
}
================================================
FILE: resource/sites/gay-torrents.org/getSearchResult.js
================================================
(function (options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/Login/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
this.haveData = true;
}
getResult() {
if (!this.haveData) {
return [];
}
let site = options.site;
let selector = options.resultSelector;
let table = options.page.find(selector);
let rows = table.find('> div.torrent');
if (rows.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return [];
}
let results = [];
try {
for (let index = 0; index < rows.length; index++) {
const row = rows.eq(index);
let title_elem = row.find('.torrent_link').first();
if (title_elem.length == 0) {
continue;
}
let comments = row.find('.downloadInfo > a:first-of-type').first().text().split(' ')[0]
let data = {
title: title_elem.text(),
link: `${site.url}${title_elem.attr('href')}`,
url: `${site.url}${row.find('.downloadLink').first().attr('href')}&secure=1`,
size: row.find('.size').first().text(),
time: row.find('.date').first().text().replace(/on\s*(\d{2}:\d{2}(?::\d{2})?)\s*(\d{1,2})-(\w{3,4})-(\d{4,})/, '$4 $3 $2 $1'),
author: row.find('.uploader > span').first().text(),
seeders: row.find('.downloadPeers > div:first-child > a').first().text(),
leechers: row.find('.downloadPeers > div:last-child > a').first().text(),
completed: row.find('.downloadTimes').first().text().split(' ')[0],
comments: comments ? comments : 0,
site: site,
tags: this.getTags(row, options.torrentTagSelectors),
entryName: options.entry.name,
category: options.searcher.getCategoryById(
site,
options.url,
row.find('.categoryNew > a').first().attr('href').split('=')[1]
)
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
}
} catch (error) {
console.log(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack;
}
return results;
}
getTags(row, selectors) {
let tags = [];
if (selectors && selectors.length > 0) {
selectors.forEach((item) => {
if (item.selector) {
let result = row.find(item.selector);
if (result.length) {
tags.push({
name: item.name,
color: item.color,
});
}
}
});
}
return tags;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, Searcher);
================================================
FILE: resource/sites/gazellegames.net/config.json
================================================
{
"name": "GGN",
"timezoneOffset": "+0000",
"description": "Game",
"url": "https://gazellegames.net/",
"icon": "https://gazellegames.net/favicon.ico",
"tags": ["Game"],
"schema": "Gazelle",
"host": "gazellegames.net",
"collaborator": "ted423",
"searchEntryConfig": {
"skipIMDbId": true,
"page": "/torrents.php",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"queryString": "searchstr=$key$",
"fieldSelector": {
"progress": {
"selector": [
"#color_seeding, #color_snatched",
"#color_leeching, #color_downloaded",
""
],
"switchFilters": [["100"], ["0"], ["null"]]
},
"status": {
"selector": [
"#color_seeding",
"#color_snatched",
"#color_leeching",
"#color_downloaded"
],
"switchFilters": [["2"], ["255"], ["1"], ["3"]]
}
}
},
"searchEntry": [
{
"name": "all",
"enabled": true
},
{
"queryString": "artistname=My+Platforms",
"name": "My Platforms",
"enabled": false
},
{
"queryString": "artistname=Applications",
"name": "Applications",
"enabled": false
},
{
"queryString": "artistname=Games",
"name": "Games",
"enabled": false
},
{
"queryString": "artistname=E-Books",
"name": "E-Books",
"enabled": false
},
{
"queryString": "artistname=OST",
"name": "OST",
"enabled": false
}
],
"selectors": {
"userBaseInfo": {
"merge": true,
"page": "/index.php",
"fields": {
"messageCount": {
"selector": [".newnoti"],
"filters": [
"query.text().match(/(\\d+)/)",
"(query && query.length>=2)?parseInt(query[1]):0"
]
}
}
},
"userExtendInfo": {
"page": "/user.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": ["#upload .stat.tooltip"],
"filters": ["query.text().replace(/,/g,'').sizeToNumber()"]
},
"downloaded": {
"selector": ["#download .stat.tooltip"],
"filters": ["query.text().replace(/,/g,'').sizeToNumber()"]
},
"levelName": {
"selector": "div:contains('Personal') + ul.stats > li:contains('Class:')",
"filters": [
"query.text().match(/Class:.+?(.+)/)",
"(query && query.length>=2)?query[1]:''"
]
},
"bonus": {
"selector": ["#gold .stat.tooltip"]
},
"joinTime": {
"selector": [
".box_personal_history ul.stats li:nth-child(2) span.time"
],
"filters": [
"query.attr('title')||query.text()",
"dateTime(query).isValid()?dateTime(query).valueOf():query"
]
},
"seeding": {
"selector": ["#seeding"]
},
"seedingSize": {
"selector": ["#seeding_size"],
"filters": ["query.text().replace(/,/g,'').sizeToNumber()"]
}
}
}
},
"torrentTagSelectors": [{
"name": "Neutral",
"selector": "strong.neutralleech_label",
"color": "purple"
},{
"name": "Free",
"selector": "strong.freeleech_label",
"color": "blue"
},{
"name": "50%",
"selector": "strong.partial_freeleech_label",
"color": "orange"
}],
"supportedFeatures": {
"imdbSearch": false
}
}
================================================
FILE: resource/sites/gazellegames.net/getSearchResult.js
================================================
if (!"".getQueryString) {
String.prototype.getQueryString = function(name, split) {
if (split == undefined) split = "&";
var reg = new RegExp(
"(^|" + split + "|\\?)" + name + "=([^" + split + "]*)(" + split + "|$)"
),
r;
if ((r = this.match(reg))) return decodeURI(r[2]);
return null;
};
}
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
if (/auth_form/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
if (
/没有种子|Your search did not match anything|用准确的关键字重试/.test(
options.responseText
)
) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
let site = options.site;
let results = [];
// 获取种子列表行
let rows = options.page.find(
options.resultSelector || "table.torrent_table:first > tbody > tr"
);
if (rows.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return results;
}
let moviename = "";
let movienames = {};
let categories = {};
let groupid;
let torrentinforows = options.page.find("tr.torrent, tr.group");
for(let index = 0; index < torrentinforows.length; index++){
let torrentinforow = torrentinforows.eq(index);
let torrentinfo = torrentinforow.find("td.center.cats_col").first();
let torrenttitle = torrentinforow.find("a[title='View Torrent'][href ^='torrents.php?id=']").first();
groupid = torrenttitle.attr("href").getQueryString("id");
movienames[groupid] = torrenttitle.parent().text().replace(/[\r\n]/g,"").replace(/Bookmark.*/g,"").trim();
if(!movienames[groupid] || new RegExp("\t[DL | RP]\t").test(movienames[groupid])){
movienames[groupid] = torrenttitle.parent().text().replace(/[\r\n]/g,"").replace(/\t+/g,"\t").replace("\t[DL | RP]\t","").split('\t')[0];
}
categories[groupid] = torrentinfo.find("div").first().attr("class").split(" ")[0].replace("cats_","");
}
// 用于定位每个字段所列的位置
let fieldIndex = {
time: 1,
size: 3,
seeders: 5,
leechers: 6,
completed: 4,
comments: -1,
author: 2
};
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
try {
// 遍历数据行
for (let index = 1; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = row.find("a[href*='torrents.php?id=']").first();
if (title.length == 0) {
continue;
}
let subTitle = row.find("div.torrent_info").first();
// 获取下载链接
let url = row.find("a[href*='torrents.php?action=download']").first();
if (url.length == 0) {
continue;
}
url = url.attr("href");
let torrentid = url.getQueryString("id");
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
if (url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
let time = "";
groupid = title.attr("href").getQueryString("id");
time =
fieldIndex.time == -1
? ""
: cells
.eq(fieldIndex.time)
.find("span[title],time[title]")
.attr("title") ||
cells.eq(fieldIndex.time).text() ||
"";
if (time) {
time += ":00";
}
let data = {
title: title.text(),
subTitle: subTitle.text(),
link,
url: url,
size: cells.eq(fieldIndex.size).html() || 0,
time: time,
author:
fieldIndex.author == -1
? ""
: cells.eq(fieldIndex.author).text() || "",
seeders:
fieldIndex.seeders == -1
? ""
: cells.eq(fieldIndex.seeders).text() || 0,
leechers:
fieldIndex.leechers == -1
? ""
: cells.eq(fieldIndex.leechers).text() || 0,
completed:
fieldIndex.completed == -1
? ""
: cells.eq(fieldIndex.completed).text() || 0,
comments:
fieldIndex.comments == -1
? ""
: cells.eq(fieldIndex.comments).text() || 0,
site: site,
entryName: options.entry.name,
tags: this.getTags(row, options.torrentTagSelectors),
category: categories[groupid],
status: Searcher.getFieldValue(site, cells, "status"),
progress: Searcher.getFieldValue(site, cells, "progress")
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
}
} catch (error) {
console.error(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.stack}`;
}
return results;
}
/**
* 获取标签
* @param {*} row
* @param {*} selectors
* @return array
*/
getTags(row, selectors) {
let tags = [];
if (selectors && selectors.length > 0) {
selectors.forEach(item => {
if (item.selector) {
let result = row.find(item.selector);
if (result.length) {
tags.push({
name: item.name,
color: item.color
});
}
}
});
}
return tags;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/sites/gfxpeers.net/config.json
================================================
{
"name": "GFXPeers",
"timezoneOffset": "+0000",
"icon": "https://gfxpeers.net/favicon.ico",
"url": "https://gfxpeers.net/",
"schema": "Gazelle",
"tags": ["设计", "素材"],
"host": "gfxpeers.net",
"collaborator": "bimzcy",
"supportedFeatures": {
"imdbSearch": false,
"userData": "◐"
}
}
================================================
FILE: resource/sites/greatposterwall.com/config.json
================================================
{
"name": "GPW",
"timezoneOffset": "+0800",
"description": "movie",
"url": "https://greatposterwall.com/",
"icon": "https://greatposterwall.com/favicon.ico",
"tags": [
"电影"
],
"schema": "GazelleJSONAPI",
"host": "greatposterwall.com",
"levelRequirements": [{
"level": "1",
"name": "Member",
"interval": "1",
"trueDownloaded": "80GB",
"ratio": "0.8",
"privilege": "发起求种;查看部分排行榜;完全访问「茶话会」版块"
},{
"level": "2",
"name": "Power User",
"interval": "2",
"uploads": "1",
"trueDownloaded": "200GB",
"ratio": "1.2",
"privilege": "免疫账号不活跃;发送邀请;赠送1枚邀请;访问论坛的「求邀区」「发邀区」「Power User」"
},{
"level": "3",
"name": "Elite",
"interval": "4",
"uploads": "25",
"trueDownloaded": "500GB",
"ratio": "1.2",
"privilege": "赠送1枚邀请;访问论坛的「Elite」;检查自己发布的种子;编辑所有种子"
},{
"level": "4",
"name": "Torrent Master",
"interval": "8",
"uploads": "100",
"trueDownloaded": "1TB",
"ratio": "1.2",
"privilege": "赠送2枚邀请;每月获赠1枚临时邀请;访问论坛的「Torrent Master」"
},{
"level": "5",
"name": "Power Torrent Master",
"interval": "12",
"uploads": "250",
"trueDownloaded": "2TB",
"ratio": "1.2",
"privilege": "赠送2枚邀请;每月获赠2枚临时邀请;检查所有种子"
},{
"level": "6",
"name": "Elite Torrent Master",
"interval": "16",
"uploads": "500",
"trueDownloaded": "5TB",
"ratio": "1.2",
"privilege": "赠送3枚邀请;每月获赠3枚临时邀请;访问论坛的「Elite Torrent Master」"
},{
"level": "7",
"name": "Guru",
"interval": "20",
"uploads": "1000",
"trueDownloaded": "10TB",
"ratio": "1.2",
"privilege": "无限邀请;访问论坛的「Guru」;查看种子检查日志"
}],
"collaborator": [
"MewX"
],
"searchEntryConfig": {
"page": "/ajax.php",
"resultType": "json",
"parseScriptFile": "getSearchResult.js",
"asyncParse": true,
"queryString": "action=browse&searchstr=$key$"
},
"searchEntry": [{
"name": "全部",
"enabled": true
}],
"selectors": {
"userBaseInfo": {
"page": "/ajax.php?action=index",
"dataType": "json",
"merge": true,
"fields": {
"seedingSize": {
"selector": ["response.userstats.seedingSize"]
},
"bonus": {
"selector": ["response.userstats.bonusPoints"]
},
"joinTime": {
"selector": ["response.userstats.joinedDate"]
},
"seeding": {
"selector": ["response.userstats.seedingCount"]
}
}
},
"userExtendInfo": {
"page": "/user.php?id=$user.id$",
"fields": {
"uploads": {
"selector": ["#upload-count-value"],
"filters" : ["query.text().replace(/,/g,'').match(/[\\d.]+/)", "query ? parseFloat(query[0]): 0"]
},
"trueDownloaded": {
"selector": ["#downloaded-value"],
"filters" : ["query.text().replace(/,/g,'').match(/[\\d.]+ ?[ZEPTGMK]?i?B/g)", "query ? query[1].sizeToNumber(): 0"]
}
}
},
"userSeedingTorrents": {
"page": "/bonus.php?action=bprates",
"fields": {
"seedingList": {
"selector": ["a[href*='torrentid=']"],
"filters": ["jQuery.map(query, item=>$(item).attr('href').match(/torrentid=(\\d+)/)[1])"]
}
}
}
}
}
================================================
FILE: resource/sites/greatposterwall.com/getSearchResult.js
================================================
(function(options) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/auth_form/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
this.haveData = true;
this.authkey = "";
this.passkey = "";
}
start() {
this.getAuthKey()
.then(() => {
options.resolve(this.getResult());
})
.catch(() => {
options.reject({
success: false,
msg: options.searcher.getErrorMessage(
options.site,
ESearchResultParseStatus.parseError,
options.errorMsg
),
data: {
site: options.site,
isLogged: options.isLogged
}
});
});
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let site = options.site;
let groups = options.page.response.results;
if (groups.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
return [];
}
let results = [];
let authkey = this.authkey;
let passkey = this.passkey;
console.log("groups.length", groups.length);
try {
groups.forEach(group => {
if (group.hasOwnProperty("torrents")) {
let torrents = group.torrents;
torrents.forEach(torrent => {
let data = {
id: torrent.torrentId,
title:
group.groupName +
" - " +
group.groupSubName +
" [" +
group.groupYear +
"] [" +
group.releaseType +
"]",
subTitle:
torrent.codec +
" / " +
torrent.source +
" / " +
torrent.resolution +
" / " +
torrent.container +
" / " +
torrent.processing +
(torrent.remasterTitle ? ` / ${torrent.remasterTitle}` : "") +
(torrent.scene ? " / Scene" : "") +
(torrent.isFreeleech ||
torrent.isNeutralLeech ||
torrent.isPersonalFreeleech
? " / Freeleech"
: "") +
(torrent.releaseGroup ? ` / ${torrent.releaseGroup}` : ""),
link: `${site.url}torrents.php?id=${group.groupId}&torrentid=${torrent.torrentId}`,
url: `${site.url}torrents.php?action=download&id=${torrent.torrentId}&authkey=${authkey}&torrent_pass=${passkey}`,
size: parseFloat(torrent.size),
time: torrent.time,
seeders: torrent.seeders,
leechers: torrent.leechers,
completed: torrent.snatches,
site: site,
entryName: options.entry.name,
category: group.releaseType,
imdbId: group.imdbId,
};
results.push(data);
});
} else {
let data = {
title: group.groupName,
link: `${site.url}torrents.php?id=${group.groupId}&torrentid=${group.torrentId}`,
url: `${site.url}torrents.php?action=download&id=${group.torrentId}&authkey=${authkey}&torrent_pass=${passkey}`,
size: parseFloat(group.size),
time: group.groupTime,
author: "",
seeders: group.seeders,
leechers: group.leechers,
completed: group.snatches,
comments: 0,
site: site,
tags: group.tags,
entryName: options.entry.name,
category: group.category,
imdbId: group.imdbId,
};
results.push(data);
}
});
console.log("results.length", results.length);
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
}
} catch (error) {
console.log(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack;
}
return results;
}
/**
* 获取 AuthKey ,用于组合完整的下载链接
*/
getAuthKey() {
const url = (options.site.activeURL + "/ajax.php?action=index")
.replace("://", "****")
.replace(/\/\//g, "/")
.replace("****", "://");
return new Promise((resolve, reject) => {
$.get(url)
.done(result => {
if (result && result.status === "success" && result.response) {
this.authkey = result.response.authkey;
this.passkey = result.response.passkey;
resolve();
} else {
reject();
}
})
.fail(() => {
reject();
});
});
}
}
let parser = new Parser(options);
parser.start();
})(options);
================================================
FILE: resource/sites/hawke.uno/config.json
================================================
{
"name": "HUNO",
"timezoneOffset": "+0000",
"schema": "UNIT3D",
"url": "https://hawke.uno/",
"icon": "https://hawke.uno/favicon.ico",
"tags": ["影视"],
"host": "hawke.unoz",
"collaborator": ["fzlins"],
"searchEntryConfig": {
"merge": true,
"resultSelector": "#torrent-list-table"
},
"torrentTagSelectors": [{
"name": "Free",
"selector": "i.fal.fa-gift.text-orange"
}],
"selectors": {
"userExtendInfo": {
"merge": true,
"page": "/users/$user.name$",
"fields": {
"levelName": {
"selector": "span[data-original-title='Class'] span"
},
"seeding": {
"selector": ".user-torrent-stats > div:nth(2) > div"
},
"uploaded": {
"selector": [".user-info td span[data-original-title='Recorded Upload']"],
"filters": ["query.text().trim().replace(/,|\\s|\\n/g,'').sizeToNumber()"]
},
"downloaded": {
"selector": [".user-info td span[data-original-title='Recorded Download']"],
"filters": ["query.text().trim().replace(/,|\\s|\\n/g,'').sizeToNumber()"]
}
}
}
}
}
================================================
FILE: resource/sites/hd-space.org/config.json
================================================
{
"name": "HD-Space",
"timezoneOffset": "+0000",
"description": "HD-Space",
"url": "https://hd-space.org/",
"icon": "https://hd-space.org/favicon.ico",
"tags": ["影视"],
"schema": "Common",
"plugins": [{
"name": "种子详情页面",
"pages": ["/index.php"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}],
"host": "hd-space.org",
"searchEntryConfig": {
"page": "/index.php?page=torrents",
"queryString": "search=$key$&active=0",
"resultType": "html",
"resultSelector": "#bodyarea > table > tbody > tr > td:nth-child(2) > table > tbody > tr:nth-child(3) > td > table > tbody > tr:not(:first-child)",
"dataRowSelector": " > tbody > tr:not(:first-child)",
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"replaceKey": [
"tt", "IMDB"
]
}],
"fieldIndex": {
"category": 0,
"title": 1,
"link": 1,
"url": 3,
"comments": 2,
"time": 4,
"size": 5,
"author": 6,
"seeders": 7,
"leechers": 8,
"completed”=": 9
},
"fieldSelector": {
"title": {
"selector": [""],
"filters": ["query.get(0).firstChild", "query.nodeValue||query.innerText||0"]
},
"link": {
"selector": [""],
"filters": ["query.children().attr('href')", "'https://hd-space.org/'+query"]
},
"url": {
"selector": [""],
"filters": ["query.children().attr('href')", "'https://hd-space.org/'+query"]
}
}
},
"searchEntry": [{
"name": "全部",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "img[src='gold/gold.png'], img[src='images/sf.png']"
}, {
"name": "50%",
"selector": "img[src='gold/silver.png']"
}],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": "a[href*='index.php?page=usercp']:first",
"attribute": "href",
"filters": ["query ? query.getQueryString('uid'):''"]
},
"name": {
"selector": "td[align='center'][style='text-align:center;']:contains('Welcome back')>span"
},
"isLogged": {
"selector": ["a[href*='logout.php']"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["a[href*='do=pm']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
},
"uploaded": {
"selector": ["td.green:contains('UP')"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["td.red:contains('DL')"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"ratio": {
"selector": "td.yellow:contains('Ratio')",
"filters": ["parseFloat(query.text().replace(' Ratio: ',''))"]
},
"levelName": {
"selector": ["td[align='center'][style='text-align:center;']:contains('Rank')"],
"filters": ["query.text().replace('Rank: ','')"]
},
"bonus": {
"selector": ["td.green:contains('Bonus')"],
"filters": ["query.text().replace('Bonus: ','')"]
},
"seeding": {
"selector": ["#menu + table > tbody > tr > td:nth-child(4) b > font:nth-child(2)"]
},
"seedingSize": {
"value": -1
}
}
},
"userExtendInfo": {
"page": "/index.php?page=usercp&uid=$user.id$",
"fields": {
"joinTime": {
"selector": ["td.header:contains('Joined on') + td"],
"filters": ["query[0].innerHTML.replace(' ', '').replace(' ', '')", "dateTime(query).valueOf()"]
}
}
},
"common": {
"page": "/index.php?page=torrent-details",
"merge": true,
"fields": {
"downloadURL": {
"selector": ["a[href*='download.php?id=']"],
"filters": ["query.attr('href')"]
},
"size": {
"selector": ["td.header:contains('Size') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
},
"sayThanksButton": {
"selector": ["#ty"],
"filters": ["query"]
}
}
}
},
"supportedFeatures": {
"imdbSearch": false,
"userData": "◐"
}
}
================================================
FILE: resource/sites/hd-space.org/details.js
================================================
(function ($, window) {
console.log("this is details.js");
if(/\?page\=torrent-details/.test(window.location.search)){
console.log("torrent-details");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.showTorrentSize();
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
let query = $("a[href*='download.php']:first");
let url = "";
if (query.length > 0) {
url = query.attr("href");
if (url.substr(0, 4) != "http") {
url = PTService.site.url + url;
}
}
return url;
}
showTorrentSize() {
let size = PTService.filters.formatSize(PTService.getFieldValue("size"));
PTService.addButton({
title: "当前种子大小",
icon: "attachment",
label: size
});
}
/**
* 获取当前种子标题
*/
getTitle() {
return $("a[href*='download.php']:first").text().trim();
}
};
(new App()).init();
}else if(/\?page\=torrents|seedwanted/.test(window.location.search)){
class App extends window.NexusPHPCommon {
init() {
// super();
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $("#bodyarea > table > tbody > tr > td:nth-child(2) > table > tbody > tr:nth-child(3) > td > table, #mcol > table > tbody > tr:nth-child(2) > td > table")
.find("a[href*='download.php']")
.toArray();
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (links.length == 0) {
return this.t("getDownloadURLsFailed"); //"获取下载链接失败,未能正确定位到链接";
}
let urls = $.map(links, item => {
let link = $(item).attr("href");
if (link && link.substr(0, 4) != "http") {
link = siteURL + link;
}
return link;
});
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("table.mainblockcontenttt:first").find(
"td:contains('MiB'),td:contains('GiB'),td:contains('TiB')"
)
);
}
}
new App().init();
}
})(jQuery, window);
================================================
FILE: resource/sites/hd-torrents.org/config.json
================================================
{
"name": "HD-Torrents",
"timezoneOffset": "+0000",
"description": "HD-Torrents.org",
"url": "https://hd-torrents.org/",
"icon": "https://hd-torrents.org/favicon.ico",
"tags": ["综合"],
"schema": "Common",
"plugins": [{
"name": "种子详情页面",
"pages": ["/details.php"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["/torrents.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/libs/album/album.js", "torrents.js"],
"styles": ["/libs/album/style.css"]
}],
"host": "hd-torrents.org",
"levelRequirements": [
{
"level": 1,
"name": "HD Maniac",
"uploaded": "50GB",
"ratio": "1.05",
"privilege": "Gain access to \"Top 10\""
},
{
"level": 2,
"name": "HD Monster",
"uploaded": "250GB",
"ratio": "2.00",
"privilege": "Gain access to \"Tracker Info\", \"Invites\" section of the forums"
},
{
"level": 3,
"name": "HD Daemon",
"uploaded": "1TB",
"ratio": "4.00",
"privilege": "Gain access to \"Users\""
}
],
"searchEntryConfig": {
"page": "/torrents.php",
"beforeSearch": {
"page": "/torrents.php",
"fields": {
"csrfToken": {
"selector": ["input[name='csrfToken']:first"],
"filters": ["query.val()"]
}
},
"dataCacheTime": 60
},
"queryString": "csrfToken=$beforeSearchData.csrfToken$&search=$key$&active=0",
"area": [{
"name": "标题",
"appendQueryString": "&options=0"
}, {
"name": "标题和简介",
"appendQueryString": "&options=1"
}, {
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"appendQueryString": "&options=2"
}],
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "table.mainblockcontenttt:last > tbody > tr",
"fieldSelector": {
"progress": {
"selector": ["td.mainblockcontentpeersall, td.mainblockcontentpeersseed, td.mainblockcontentpeersleech, td.mainblockcontenthistact, td.mainblockcontentpeersuploaded"],
"filters": ["query.is('.mainblockcontentpeersall')? null : query.is('.mainblockcontentpeersseed, .mainblockcontentpeersuploaded, .mainblockcontenthistact')?100: 0"]
},
"status": {
"selector": ["td.mainblockcontentpeersall, td.mainblockcontentpeersseed, td.mainblockcontentpeersleech, td.mainblockcontenthistact, td.mainblockcontentpeersuploaded"],
"filters": ["query.is('.mainblockcontentpeersall')? null : query.is('.mainblockcontentpeersseed')? 2: query.is('.mainblockcontenthistact, .mainblockcontentpeersuploaded')? 255: 1"]
}
}
},
"searchEntry": [{
"name": "全部",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "img[src*='free.png']"
}, {
"name": "75%",
"selector": "img[src*='25.png']"
}, {
"name": "50%",
"selector": "img[src*='50.png']"
}, {
"name": "25%",
"selector": "img[src*='75.png']"
}],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"id": {
"selector": ["a[href*='usercp.php?uid=']:first"],
"attribute": "href",
"filters": ["query ? query.getQueryString('uid'):''"]
},
"isLogged": {
"selector": ["a[href*='logout.php?']"],
"filters": ["query.length>0"]
},
"csrfToken": {
"selector": ["input[name='csrfToken']"],
"filters": ["query.val()"]
},
"messageCount": {
"selector": [".new-pm.warning"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
}
}
},
"userExtendInfo": {
"page": "/usercp.php?uid=$user.id$",
"fields": {
"name": {
"selector": ["tr#CurrentDetailsHideShowTR td.header:contains('User') + td"]
},
"uploaded": {
"selector": ["td.header:contains('Uploaded') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["td.header:contains('Downloaded') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"ratio": {
"selector": "td.header:contains('Ratio') + td",
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+)/)", "(query && query.length>=2)?query[1]:null"]
},
"levelName": {
"selector": "td.header:contains('Rank') + td"
},
"bonus": {
"selector": ["td.header:contains('Seed Bonus Points') + td"],
"filters": ["query.text().replace(/,/g,'')"]
},
"joinTime": {
"selector": "td.header:contains('Joined on') + td",
"filters": ["query.text().split(' ')", "query[0].split('/')[2]+'-'+query[0].split('/')[1]+'-'+query[0].split('/')[0]+' '+query[1]", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
},
"seeding": {
"selector": ["td.nav[title='Active-Torrents'] > a[href*='#actives']"],
"filters": ["query.text().replace(/,/g,'')"]
}
}
},
"userSeedingTorrents": {
"page": "/usercp.php?uid=$user.id$",
"parser": "getUserSeedingTorrents.js",
"fields": {
"seedingSize": {
"selector": ["tr#SeedingtorrentsHideShowTR table.lista tr:not(:eq(0))"],
"filters": ["jQuery.map(query.find('td:eq(1)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
}
}
},
"bonusExtendInfo": {
"prerequisites": "!user.bonusPerHour",
"page": "/seedbonus.php",
"fields": {
"bonusPerHour": {
"selector": ["#BonusPointsHideShowTR .blockcontent center:eq(0) h1 font[color='blue']:eq(2)"],
"filters": ["parseFloat(query.text())"]
}
}
},
"common": {
"page": "/details.php",
"merge": true,
"fields": {
"size": {
"selector": ["td.detailsleft:contains('Size:') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
},
"sayThanksButton": {
"selector": ["#ty"],
"filters": ["query"]
}
}
}
}
}
================================================
FILE: resource/sites/hd-torrents.org/details.js
================================================
(function ($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.showTorrentSize();
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
let query = $("a[href*='download.php']:first");
let url = "";
if (query.length > 0) {
url = query.attr("href");
if (url.substr(0, 4) != "http") {
url = PTService.site.url + url;
}
}
return url;
}
showTorrentSize() {
let size = PTService.filters.formatSize(PTService.getFieldValue("size"));
PTService.addButton({
title: "当前种子大小",
icon: "attachment",
label: size
});
}
/**
* 获取当前种子标题
*/
getTitle() {
return $("a[href*='download.php']:first").text().trim();
}
};
(new App()).init();
})(jQuery, window);
================================================
FILE: resource/sites/hd-torrents.org/getSearchResult.js
================================================
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
if (/login\.php/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
if (/No torrents here/.test(options.responseText)) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let results = [];
let site = options.site;
// 获取种子列表行
let rows = options.page.find(options.resultSelector);
// 用于定位每个字段所列的位置
let fieldIndex = {
title: 2,
// 时间
time: 6,
// 大小
size: 7,
// 上传人数
seeders: 9,
// 下载人数
leechers: 10,
// 完成人数
completed: 11,
// 评论人数
comments: 3,
// 发布人
author: 8,
category: 0
};
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
// 遍历数据行
for (let index = 2; index < rows.length; index += 2) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = cells.eq(fieldIndex.title).find("a[href*='details.php']");
if (title.length == 0) {
continue;
}
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
let url = row.find("a[href*='download.php']").attr("href");
if (url && url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
let dateString = cells
.eq(fieldIndex.time)
.text()
.replace(" ", " ");
let dayStringArray = dateString.split(" ")[1].split("/");
let time = dateString.split(" ")[0];
let data = {
title: title.text(),
subTitle: "",
link,
url: url,
size: cells.eq(fieldIndex.size).html() || 0,
time: `${dayStringArray[2]}-${dayStringArray[1]}-${dayStringArray[0]} ${time}`,
author: cells.eq(fieldIndex.author).text() || "",
seeders: cells.eq(fieldIndex.seeders).text() || 0,
leechers: cells.eq(fieldIndex.leechers).text() || 0,
completed: cells.eq(fieldIndex.completed).text() || 0,
comments: cells.eq(fieldIndex.comments).text() || 0,
site: site,
entryName: options.entry.name,
category: this.getCategory(cells.eq(fieldIndex.category)),
tags: Searcher.getRowTags(site, row),
progress: Searcher.getFieldValue(site, row, "progress"),
status: Searcher.getFieldValue(site, row, "status")
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
}
return results;
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: "",
link: ""
};
let link = cell.find("a:first");
let img = link.find("img:first");
result.link = link.attr("href");
if (result.link && result.link.substr(0, 4) !== "http") {
result.link = options.site.url + result.link;
}
result.name = img.attr("alt");
return result;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/sites/hd-torrents.org/getUserSeedingTorrents.js
================================================
(function(options, User) {
class Parser {
constructor(options, dataURL) {
this.options = options;
this.dataURL = dataURL;
this.body = null;
this.rawData = "";
this.pageInfo = {
count: 0,
current: 0
};
this.result = {
seedingSize: 0
};
this.load();
}
/**
* 完成
*/
done() {
this.options.resolve(this.result);
}
/**
* 解析内容
*/
parse() {
const doc = new DOMParser().parseFromString(this.rawData, "text/html");
// 构造 jQuery 对象
this.body = $(doc).find("body");
this.getPageInfo();
let results = new User.InfoParser(User.service).getResult(
this.body,
this.options.rule
);
if (results) {
this.result.seedingSize += results.seedingSize;
}
// 是否已到最后一页
if (this.pageInfo.current < this.pageInfo.count) {
this.pageInfo.current++;
this.load();
} else {
this.done();
}
}
/**
* 获取页面相关内容
*/
getPageInfo() {
if (this.pageInfo.count > 0) {
return;
}
// 获取最大页码
const infos = this.body
.find("a[href*='activepage']:contains('1'):last")
.attr("href");
if (infos) {
this.pageInfo.count = parseInt(infos.getQueryString("activepage"));
} else {
this.pageInfo.count = 1;
}
}
/**
* 加载当前页内容
*/
load() {
let url = this.dataURL;
if (this.pageInfo.current > 0) {
url += "&activepage=" + this.pageInfo.current;
}
$.get(url)
.done(result => {
this.rawData = result;
this.parse();
})
.fail(() => {
this.done();
});
}
}
let dataURL = options.site.activeURL + options.rule.page;
dataURL = dataURL
.replace("$user.id$", options.userInfo.id)
.replace("$user.name$", options.userInfo.name)
.replace("://", "****")
.replace(/\/\//g, "/")
.replace("****", "://");
new Parser(options, dataURL);
})(_options, _self);
/**
*
_options 表示当前参数
{
site,
rule,
userInfo,
resolve,
reject
}
_self 表示 User(/src/background/user.ts) 类实例
*/
================================================
FILE: resource/sites/hd-torrents.org/torrents.js
================================================
(function($) {
console.log("this is torrent.js");
class App extends window.NexusPHPCommon {
init() {
// super();
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
// 添加封面模式
PTService.addButton({
title: PTService.i18n.t("buttons.coverTip"), //"以封面的方式进行查看",
icon: "photo",
label: PTService.i18n.t("buttons.cover"), //"封面模式",
click: (success, error) => {
// 获取目标表格
let items = $(
"table.mainblockcontenttt a[href*='details.php?id='][onmouseover]"
);
let images = [];
items.each((index, item) => {
let text = $(item).attr("onmouseover");
let query = text.match(/(.+)(img src=\\\')([^\']+)\\\'/);
if (query && query.length > 3) {
let url = location.origin + "/" + query[3];
let href = $(item).attr("href");
let title = $(item).text();
images.push({
url: url,
key: href,
title: title,
link: href
});
}
});
success();
if (images.length > 0) {
// 创建预览
new album({
images: images,
onClose: () => {
PTService.buttonBar.show();
}
});
PTService.buttonBar.hide();
}
}
});
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $("table.mainblockcontenttt:first")
.find("a[href*='download.php']")
.toArray();
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (links.length == 0) {
return this.t("getDownloadURLsFailed"); //"获取下载链接失败,未能正确定位到链接";
}
let urls = $.map(links, item => {
let link = $(item).attr("href");
if (link && link.substr(0, 4) != "http") {
link = siteURL + link;
}
return link;
});
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("table.mainblockcontenttt:first").find(
"td:contains('MiB'),td:contains('GiB'),td:contains('TiB')"
)
);
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/hdatmos.club/config.json
================================================
{
"name": "HDATMOS",
"timezoneOffset": "+0800",
"icon": "https://hdatmos.club/favicon.ico",
"schema": "NexusPHP",
"tags": ["影视", "综合"],
"url": "https://hdatmos.club",
"host": "hdatmos.club",
"collaborator": ["luoyefe", "zhuweitung"],
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"privilege": "一个邀请名额;直接发布种子;查看NFO文档;查看用户列表;请求续种; 发送邀请;查看排行榜;查看其它用户的种子历史;删除自己上传的字幕。"
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"privilege": "封存账号后不会被删除"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"privilege": "两个邀请名额;在做种/下载/发布的时候选择匿名模式"
},{
"level": "4",
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.45",
"privilege": "查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"privilege": "三个邀请名额;查看其它用户的评论、帖子历史;永远保留账号"
},{
"level": "6",
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"privilege": "更新过期的外部信息;查看Extreme User论坛"
},{
"level": "7",
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"privilege": "五个邀请名额"
},{
"level": "8",
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"privilege": "十个邀请名额"
}],
"selectors": {
"userSeedingTorrents": {
"prerequisites": "!user.seeding",
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["body"],
"filters": ["query.text().replace(/,/g,'').match(/[\\d]+/)", "query ? query[0] : 0"]
},
"seedingSize": {
"selector": ["body"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "query ? query[0].sizeToNumber() : 0"]
}
}
}
},
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"],
"filters": ["query ? parseFloat(query.attr('title').match(/[\\d.]+/)) : null"]
},
"status": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"],
"filters": [
"query ? query.attr('title') : ''",
"query.indexOf('seeding') != -1 ? 2 : query.indexOf('leeching') != -1 ? 1 : query.indexOf('100%') != -1 ? 255 : 3"
]
}
}
}
}
================================================
FILE: resource/sites/hdbits.org/browse.js
================================================
(function ($) {
console.log("this is browse.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
isNexusPHP() {//want use same code
return PTService.site.schema == "HDB";
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons(false);
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let siteURL = PTService.site.url;
let links = $("a.js-download").toArray();
let urls = $.map(links, (item) => {
let link = $(item).attr("href");
link = link.replace("source=browse", "source=rss");
link = link.replace(new RegExp("/download.php/.*\.torrent"),"download.php");
if (link && link.substr(0, 4) !== "http") {
link = `${siteURL}${link}`;
}
return link;
});
if (links.length == 0) {
return "获取下载链接失败,未能正确定位到链接";
}
return urls;
}
/**
* 执行指定的操作
* @param {*} action 需要执行的执令
* @param {*} data 附加数据
* @return Promise
*/
call(action, data) {
return new Promise((resolve, reject) => {
switch (action) {
// 从当前的DOM中获取下载链接地址
case PTService.action.downloadFromDroper:
this.downloadFromDroper(data, () => {
resolve()
});
break;
}
});
}
getDroperURL(url) {
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (!url.getQueryString) {
PTService.showNotice({
msg:
"系统依赖函数(getQueryString)未正确加载,请尝试刷新页面或重新启用插件。"
});
return null;
}
if (url.indexOf("download.php") == -1) {
let id = url.getQueryString("id");
let firstlink = $("a.js-download:first");
let passkey = firstlink.attr("href").getQueryString("passkey");
if (id) {
// 如果站点没有配置禁用https,则默认添加https链接
url =
siteURL +
"download.php?id=" +
id +
(PTService.site.passkey
? "&passkey=" + PTService.site.passkey
: passkey ? "&passkey="+ passkey : "") +
"&source=rss";
} else {
url = "";
}
}
return url;
}
/**
* 下载拖放的种子
* @param {*} data
* @param {*} callback
*/
downloadFromDroper(data, callback) {
if (typeof data === "string") {
data = {
url: data,
title: ""
};
}
let result = this.getDroperURL(data.url);
if (!result) {
callback();
return;
}
this.sendTorrentToDefaultClient(result).then((result) => {
callback(result);
}).catch((result) => {
callback(result);
});
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize($("#torrent-list").find("td.center:contains('MiB'),td.center:contains('GiB'),td.center:contains('TiB')"));
}
}
(new App()).init();
})(jQuery);
================================================
FILE: resource/sites/hdbits.org/config.json
================================================
{
"name": "HDB",
"timezoneOffset": "+0000",
"description": "HDB",
"url": "https://hdbits.org/",
"icon": "https://hdbits.org/favicon.ico",
"tags": ["影视", "综合"],
"schema": "HDB",
"plugins": [{
"name": "种子详情页面",
"pages": ["^/t/(\\d+)/$", "/details.php"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["/browse.php"],
"scripts": ["/schemas/NexusPHP/common.js", "browse.js"]
}],
"host": "hdbits.org",
"levelRequirements": [
{
"level": "1",
"name": "1080i",
"interval": "4",
"downloaded": "30GB",
"ratio": "0.95",
"privilege": "You can view NFOs and request reseeds on poorly seeded torrents."
},
{
"level": "2",
"name": "1080p",
"interval": "4",
"downloaded": "500GB",
"ratio": "1.4",
"privilege": "As 1080i"
},
{
"level": "3",
"name": "UHD",
"interval": "4",
"downloaded": "500GB",
"ratio": "2.5",
"privilege": "As 1080i"
}
],
"searchEntryConfig": {
"page": "/browse.php",
"queryString": "search=$key$",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "table#torrent-list:last > tbody > tr",
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"queryString": "imdb=$key$"
}],
"fieldSelector": {
"progress": {
"selector": ["span.tag.tag_seeding, span.tag.tag_completed", "span.tag.tag_leeching", ""],
"switchFilters": [
["100"],
["0"],
["null"]
]
},
"status": {
"selector": ["span.tag.tag_seeding", "span.tag.tag_completed", "span.tag.tag_leeching"],
"switchFilters": [
["2"],
["255"],
["1"]
]
}
}
},
"searchEntry": [{
"name": "全部",
"enabled": true
},
{
"queryString": "cat=1",
"name": "Movie",
"enabled": false
},
{
"queryString": "cat=2",
"name": "TV",
"enabled": false
},
{
"queryString": "cat=3",
"name": "Documentary",
"enabled": false
},
{
"queryString": "cat=4",
"name": "Music",
"enabled": false
},
{
"queryString": "cat=5",
"name": "Sport",
"enabled": false
},
{
"queryString": "cat=6",
"name": "Audio Track",
"enabled": false
},
{
"queryString": "cat=7",
"name": "XXX",
"enabled": false
},
{
"queryString": "cat=8",
"name": "Misc/Demo",
"enabled": false
}
],
"categories": [{
"entry": "browse.php?",
"result": "cat=$id$",
"category": [{
"id": 1,
"name": "Movie"
},
{
"id": 2,
"name": "TV"
},
{
"id": 3,
"name": "Documentary"
},
{
"id": 4,
"name": "Music"
},
{
"id": 5,
"name": "Sport"
},
{
"id": 6,
"name": "Audio Track"
},
{
"id": 7,
"name": "XXX"
},
{
"id": 8,
"name": "Misc/Demo"
}
]
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "a[title^='100% FL:']"
}, {
"name": "50%",
"selector": "a[title^='50% Free Leech:']"
}, {
"name": "25%",
"selector": "a[title^='25% Free Leech:']"
}],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": "a[href*='userdetails.php']:first",
"attribute": "href",
"filters": ["query ? query.getQueryString('id'):''"]
},
"name": {
"selector": "a[href*='userdetails.php']:first"
},
"isLogged": {
"selector": ["a[href*='logout.php']"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["a.alert-box--pm, span.js-notifications-count"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": ["td.rowhead:contains('Uploaded') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["td.rowhead:contains('Downloaded') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"ratio": {
"selector": "td.rowhead:contains('Share ratio') + td",
"filters": ["parseFloat(query.text())"]
},
"levelName": {
"selector": ["td.rowhead:contains('Class') + td"]
},
"bonus": {
"selector": ["td.rowhead:contains('Bonus') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+)/)", "(query && query.length>=2)?query[1]:''"]
},
"joinTime": {
"selector": ["td.rowhead:contains('JOIN'):contains('date') + td"],
"filters": ["query.text().split(' (')[0]", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
},
"seeding": {
"selector": ["td.heading:contains('Currently'):contains('seeding') + td"],
"filters": ["query.text().match(/([\\d.]+)/)", "(query && query.length>=1)?query[0]:''"]
},
"seedingSize": {
"selector": ["td.heading:contains('Seeding size') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
}
}
}
}
}
================================================
FILE: resource/sites/hdbits.org/details.js
================================================
(function ($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
isNexusPHP() {//want use same code
return PTService.site.schema == "HDB";
}
/**
* 初始化按钮列表
*/
initButtons() {
this.showTorrentSize();
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
let siteURL = PTService.site.url;
let query = $("a[href*='download.php']");
let url = "";
if (query.length > 0) {
url = query.attr("href");
url = url.replace("source=browse", "source=rss");
url = url.replace(new RegExp("/download.php/.*\.torrent"),"download.php");
if (url && url.substr(0, 4) !== "http") {
url = `${siteURL}${url}`;
}
}
return url;
}
showTorrentSize() {
let query = $("th:contains('Size') + td");
let size = "";
if (query.length > 0) {
size = query.text();
// attachment
PTService.addButton({
title: "当前种子大小",
icon: "attachment",
label: size
});
}
}
getTitle() {
let query = $("a[href*='download.php']");
return query ? query.text().replace(".torrent", ""): "";
}
};
(new App()).init();
})(jQuery, window);
================================================
FILE: resource/sites/hdbits.org/getSearchResult.js
================================================
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/\/doLogin/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
if (/Nothing found/.test(options.responseText)) {
options.status = ESearchResultParseStatus.noTorrents;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let results = [];
let site = options.site;
// 获取种子列表行
let rows = options.page.find(
options.resultSelector || "table#torrent-list:last > tbody > tr"
);
// 用于定位每个字段所列的位置
let fieldIndex = {
progress: 2,
status: 2,
// 时间
time: 4,
// 大小
size: 5,
// 上传人数
seeders: 7,
// 下载人数
leechers: 8,
// 完成人数
completed: 6,
// 标题
name: 2,
// 发布人
author: 9,
//配置
category: 0
};
if(rows.eq(0).find("td[id*=codec]").length == 0) {
fieldIndex = {progress: 1,status: 1,time: 3,size: 4,seeders: 6,leechers: 7,completed: 5,name: 1,author: 8,category: 0};
}
if (site.url.substr(-1) == "/") {
site.url = site.url.substr(0, site.url.length - 1);
}
// 遍历数据行
for (let index = 0; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = cells.eq(fieldIndex.name).find("b > a");
if (title.length == 0) {
continue;
}
let titleStrings = title.html().split("::");
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
let url = row.find("a.js-download").attr("href");
if (url && url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
if (!url) {
continue;
}
let subTitle = "";
if (titleStrings.length > 0) {
subTitle = $("")
.html(titleStrings[1])
.text();
}
let time =
cells
.eq(fieldIndex.time)
.text()
.replace(/([a-zA-Z]+)/g, "$1 ")
.replace(/^\s+|\s+$/g, "") + ".";
let data = {
title: $("")
.html(titleStrings[0])
.text(),
subTitle: subTitle || "",
link,
url: url,
size: cells.eq(fieldIndex.size).html() || 0,
time: time || "",
author: cells.eq(fieldIndex.author).text() || "",
seeders:
cells
.eq(fieldIndex.seeders)
.text()
.split("/")[0] || 0,
leechers:
cells
.eq(fieldIndex.leechers)
.text()
.split("/")[1] || 0,
completed: cells.eq(fieldIndex.completed).text() || 0,
comments: cells.eq(fieldIndex.comments).text() || 0,
site: site,
entryName: options.entry.name,
category: this.getCategory(cells.eq(fieldIndex.category)),
tags: Searcher.getRowTags(site, row),
progress: Searcher.getFieldValue(site, cells.eq(fieldIndex.progress), "progress"),
status: Searcher.getFieldValue(site, cells.eq(fieldIndex.status), "status")
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
}
return results;
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: "",
link: ""
};
let link = cell.find("a:first");
result.link = link.attr("href");
let id = result.link.match(/cat=(\d+)/)[1];
if (result.link.substr(0, 4) !== "http") {
result.link = options.site.url + result.link;
}
result.name = this.getCategoryName(id);
return result;
}
getCategoryName(id) {
if ($.isEmptyObject(this.categories)) {
let cells = options.page
.find("table.bottom > tbody > tr")
.eq(1)
.find("td");
cells.each((i, dom) => {
let id = $(dom)
.find("input")
.attr("id");
id = id.replace("c", "");
let name = $(dom)
.find("a")
.text();
if (id) {
this.categories[id] = name;
}
});
}
return this.categories ? this.categories[id] : "";
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/sites/hdchina.org/config.json
================================================
{
"name": "HDChina",
"timezoneOffset": "+0800",
"description": "高清影音人士分享乐园",
"url": "https://hdchina.org/",
"icon": "https://hdchina.org/favicon.ico",
"tags": [
"影视",
"音乐",
"纪录片",
"综合"
],
"schema": "NexusPHP",
"host": "hdchina.org",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "5",
"downloaded": "200GB",
"ratio": "1.5",
"privilege": "可以使用道具,可以打开签名和个性化称号"
},{
"level": "2",
"name": "Elite User",
"interval": "10",
"downloaded": "500GB",
"ratio": "2.0",
"privilege": "可以在候选区投票,可以在论坛建议区发帖,可以上传字幕,可以删除自己上传的字幕。"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "1TB",
"ratio": "2.5",
"privilege": "可以进入邀请区。"
},{
"level": "4",
"name": "Insane User",
"interval": "20",
"downloaded": "1.5TB",
"ratio": "3.0",
"privilege": "并可以直接发布种子,无需候选。"
},{
"level": "5",
"name": "Veteran User",
"interval": "25",
"downloaded": "2TB",
"ratio": "4.0",
"privilege": "可以在个人资料内隐藏个人信息,可以匿名做种。"
},{
"level": "6",
"name": "Extreme User",
"interval": "30",
"downloaded": "3TB",
"ratio": "5.0",
"privilege": "发送邀请,可以查看其它会员种子历史,可以更新IMDb信息。"
},{
"level": "7",
"name": "Ultimate User",
"interval": "40",
"downloaded": "4TB",
"ratio": "6.0",
"privilege": "账号挂起永久保留。取消一个月只能发送一个邀请的限制。"
},{
"level": "8",
"name": "Nexus Master",
"interval": "50",
"downloaded": "5TB",
"ratio": "8.0",
"privilege": "账号永久保存(无需挂起)"
}],
"searchEntryConfig": {
"resultSelector": "table.torrent_list:last > tbody > tr",
"fieldSelector": {
"progress": {
"selector": [".progress:eq(0) > div"],
"filters": ["query.attr('style')||''", "query.match(/width:([ \\d.]+)%/)", "(query && query.length>=2)?query[1]:null"]
},
"status": {
"selector": [".progress:eq(0) > div"],
"filters": ["query.attr('class')", "query=='progress_seeding'?2:(query=='progress_completed'?255:(query=='progress_no_downloading'?3:1))"]
}
}
},
"searchEntry": [{
"name": "全部",
"enabled": true
},
{
"queryString": "cat20=1",
"name": "原盘(Full BD)",
"enabled": false
},
{
"queryString": "cat17=1",
"name": "电影Movie(1080p)",
"enabled": false
},
{
"queryString": "cat16=1",
"name": "电影Movie(1080i)",
"enabled": false
},
{
"queryString": "cat9=1",
"name": "电影Movie(720p)",
"enabled": false
},
{
"queryString": "cat13=1",
"name": "欧美剧(EU/US TV series)",
"enabled": false
},
{
"queryString": "cat25=1",
"name": "中港台剧集(Chinese TV series)",
"enabled": false
},
{
"queryString": "cat26=1",
"name": "韩剧(Kor Drama)",
"enabled": false
},
{
"queryString": "cat24=1",
"name": "日剧(Jpn Drama)",
"enabled": false
},
{
"queryString": "cat21=1",
"name": "欧美剧集包(EU/US TV series pack)",
"enabled": false
},
{
"queryString": "cat22=1",
"name": "中港台剧集包(Chinese TV series pack)",
"enabled": false
},
{
"queryString": "cat23=1",
"name": "日韩剧集包(JPN/KOR drama pack)",
"enabled": false
},
{
"queryString": "cat27=1",
"name": "iPad视频(iPad Video)",
"enabled": false
},
{
"queryString": "cat5=1",
"name": "纪录片(Documentary)",
"enabled": false
},
{
"queryString": "cat15=1",
"name": "体育节目(Sports)",
"enabled": false
},
{
"queryString": "cat14=1",
"name": "动画片(Animation)",
"enabled": false
},
{
"queryString": "cat401=1",
"name": "综艺(TV Shows)",
"enabled": false
},
{
"queryString": "cat402=1",
"name": "演唱会(Vocal Concert)",
"enabled": false
},
{
"queryString": "cat406=1",
"name": "MV(Music Video)",
"enabled": false
},
{
"queryString": "cat408=1",
"name": "音乐(Music)",
"enabled": false
},
{
"queryString": "cat19=1",
"name": "补充音轨(Audio Track)",
"enabled": false
},
{
"queryString": "cat405=1",
"name": "戏剧(Drama)",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "书籍(Book)",
"enabled": false
},
{
"queryString": "cat409=1",
"name": "其他(Other)",
"enabled": false
},
{
"queryString": "cat410=1",
"name": "4K UltraHD",
"enabled": false
},
{
"queryString": "cat411=1",
"name": "旅游(Travel)",
"enabled": false
},
{
"queryString": "cat412=1",
"name": "饮食(Food)",
"enabled": false
}
],
"categories": [{
"entry": "*",
"result": "&cat$id$=1",
"category": [{
"id": 20,
"name": "原盘(Full BD)"
},
{
"id": 17,
"name": "电影Movie(1080p)"
},
{
"id": 16,
"name": "电影Movie(1080i)"
},
{
"id": 9,
"name": "电影Movie(720p)"
},
{
"id": 13,
"name": "欧美剧(EU/US TV series)"
},
{
"id": 25,
"name": "中港台剧集(Chinese TV series)"
},
{
"id": 26,
"name": "韩剧(Kor Drama)"
},
{
"id": 24,
"name": "日剧(Jpn Drama)"
},
{
"id": 21,
"name": "欧美剧集包(EU/US TV series pack)"
},
{
"id": 22,
"name": "中港台剧集包(Chinese TV series pack)"
},
{
"id": 23,
"name": "日韩剧集包(JPN/KOR drama pack)"
},
{
"id": 27,
"name": "iPad视频(iPad Video)"
},
{
"id": 5,
"name": "纪录片(Documentary)"
},
{
"id": 15,
"name": "体育节目(Sports)"
},
{
"id": 14,
"name": "动画片(Animation)"
},
{
"id": 401,
"name": "综艺(TV Shows)"
},
{
"id": 402,
"name": "演唱会(Vocal Concert)"
},
{
"id": 406,
"name": "MV(Music Video)"
},
{
"id": 408,
"name": "音乐(Music)"
},
{
"id": 19,
"name": "补充音轨(Audio Track)"
},
{
"id": 405,
"name": "戏剧(Drama)"
},
{
"id": 404,
"name": "书籍(Book)"
},
{
"id": 409,
"name": "其他(Other)"
},
{
"id": 410,
"name": "4K UltraHD"
},
{
"id": 411,
"name": "旅游(Travel)"
},
{
"id": 412,
"name": "饮食(Food)"
}
]
}],
"selectors": {
"userExtendInfo": {
"merge": true,
"topElement": "html",
"fields": {
"seeding": {
"selector": ["div#ka1"],
"filters": ["query.parent().text().match(/\\(([\\d.]+)个种子/)", "(query && query.length>=2)?query[1]:null"]
},
"seedingSize": {
"selector": ["div#ka1"],
"filters": ["query.parent().text().match(/共计([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
},
"messageCount": {
"selector": ["div.msgalert a[href='messages.php']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
},
"xCsrf": {
"selector": ["meta[name='x-csrf']"],
"attribute": "content"
}
}
},
"userSeedingTorrents": {
"prerequisites": "!user.seeding",
"page": "/ajax_getusertorrentlist.php",
"dataType": "json",
"requestMethod": "POST",
"requestData": {
"userid": "$user.id$",
"type": "seeding",
"csrf": "$user.xCsrf$"
},
"fields": {
"seeding": {
"selector": ["message"],
"filters": ["jQuery('').html(query).find('tr:not(:eq(0))').length"]
},
"seedingSize": {
"selector": ["message"],
"filters": ["jQuery('').html(query).find('tr:not(:eq(0))')", "jQuery.map(query.find('td.rowfollow:eq(2)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
}
}
},
"/details.php": {
"merge": true,
"fields": {
"downloadURL": {
"selector": ["a#clip_target"],
"filters": ["query.attr('href')"]
}
}
}
},
"mergeSchemaTagSelectors": true,
"torrentTagSelectors": [{
"name": "⛔️",
"selector": "img[src*='pic/share_rule_1.gif']"
}]
}
================================================
FILE: resource/sites/hdcity.city/config.json
================================================
{
"name": "HDCity",
"timezoneOffset": "+0800",
"description": "无",
"url": "https://hdcity.city/",
"icon": "https://hdcity.city/favicon.ico",
"tags": [
"综合",
"影视"
],
"plugins": [{
"name": "种子列表",
"pages": ["/pt"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/NexusPHP/torrents.js"]
}],
"schema": "NexusPHP",
"host": "hdcity.city",
"levelRequirements": [
{
"level": 1,
"name": "Power Angel",
"interval": "4",
"uploaded": "50GB",
"ratio": "1.0",
"privilege": "可以请求续种;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\")。"
},
{
"level": 2,
"name": "Elite Angel",
"interval": "8",
"uploaded": "150GB",
"ratio": "1.1",
"privilege": "权天使及以上等级封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy Angel",
"interval": "12",
"uploaded": "500GB",
"ratio": "1.5",
"privilege": "可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane Angel",
"interval": "16",
"uploaded": "1TB",
"ratio": "2.0",
"privilege": "可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran Angel",
"interval": "24",
"uploaded": "5TB",
"ratio": "2.5",
"privilege": "主天使及以上市民会永远保留账号。"
},
{
"level": 6,
"name": "Extreme Angel",
"interval": "36",
"uploaded": "10TB",
"ratio": "2.6",
"privilege": "无"
},
{
"level": 7,
"name": "Ultimate Angel",
"interval": "72",
"uploaded": "20TB",
"ratio": "2.8",
"privilege": "比较牛逼的等级。"
},
{
"level": 8,
"name": "Master Angel",
"interval": "100",
"uploaded": "40TB",
"ratio": "4.0",
"privilege": "最牛逼的市民,或特殊任务分配。"
}
],
"collaborator": "waldens",
"searchEntryConfig": {
"page": "/pt",
"queryString": "iwannaseethis=$key$¬newword=1&v=legacyinv",
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"appendQueryString": "&search_area=1"
}],
"parseScriptFile": "/schemas/Common/getSearchResult.js",
"resultSelector": "div.text, div.text_alt, div.tr_review, div.tr_inpro",
"dataRowSelector": "> table",
"fieldSelector": {
"title": {
"selector": ["span[style='color:#777']"],
"filters": ["query.text()"]
},
"subTitle": {
"selector": ["a.torname"],
"filters": ["query.text()"]
},
"link": {
"selector": ["a.torname"],
"filters": ["query.attr('href')", "'https://hdcity.city/'+query"]
},
"url": {
"selector": ["a[href^=download]"],
"filters": ["query.attr('href')", "'https://hdcity.city/'+query"]
},
"time": {
"selector": ["td:nth-child(8)"],
"filters": ["query.text()"]
},
"size": {
"selector": ["nobr:contains('B')"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)[0]"]
},
"seeders": {
"selector": ["a[href*='#seeders'] font"],
"filters": ["query.text()"]
},
"leechers": {
"selector": ["a[href*='#leechers']"],
"filters": ["$(query[0].childNodes[1]).text()"]
},
"completed": {
"selector": ["a[href^='viewsnatches']:first"],
"filters": ["$(query[0].childNodes[1]).text()"]
},
"progress": {
"selector": ["div.pbo div.pbc.sd, div.pbo div.pbc.ns", ".pbo div.pbc.dl", ""],
"switchFilters": [
["100"],
["query.attr('style').replace('width:','').replace('%;','')"],
["null"]
]
},
"status": {
"selector": ["div.pbo div.pbc.sd","div.pbo div.pbc.ns", ".pbo div.pbc.dl"],
"switchFilters": [
["2"],
["255"],
["3"]
]
}
}
},
"searchEntry": [{
"name": "全部",
"enabled": true
}],
"categories": [{
"entry": "*",
"result": "&cat$id$=1",
"category": [{
"id": 401,
"name": "Movies/电影"
},
{
"id": 402,
"name": "Series/剧集"
},
{
"id": 404,
"name": "Doc/档案记录"
},
{
"id": 405,
"name": "Anim/动漫"
},
{
"id": 403,
"name": "Shows/节目"
},
{
"id": 406,
"name": "MV/音乐视频"
},
{
"id": 407,
"name": "Sports/体育"
},
{
"id": 408,
"name": "Audio/音频"
},
{
"id": 727,
"name": "XXX/家长指引"
},
{
"id": 728,
"name": "Edu/文档/教材"
},
{
"id": 729,
"name": "Soft/软件"
},
{
"id": 409,
"name": "Other/其他"
}
]
}],
"selectors": {
"userBaseInfo": {
"page": "/userdetails",
"fields": {
"id": {
"selector": ["div.text:contains('ID')"],
"filters": ["query.text().match(/\\d+/)"]
},
"name": {
"selector": ["a[href*='userdetails'] > strong:first"],
"filters": ["query.text()"]
},
"isLogged": {
"selector": ["a[href*='logout']"],
"filters": ["query.length > 0"]
}
}
},
"userExtendInfo": {
"page": "/userdetails",
"fields": {
"uploaded": {
"selector": ["div.text:contains('上传量')", "div.text:contains('上傳量')", "div.text:contains('Uploaded')"],
"filters": ["query.text().replace(/,/g,'').match(/(?:上[传傳]量|Uploaded).+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["div.text:contains('下载量')", "div.text:contains('下載量')", "div.text:contains('Downloaded')"],
"filters": ["query.text().replace(/,/g,'').match(/(?:下[载載]量|Downloaded).+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"levelName": {
"selector": "img[src*='/pic/class/']",
"attribute": "src",
"filters": ["query.match(/\\/pic\\/class\\/(\\d+).gif/)[1]", "({0:'堕落者(Peasant)',1: '天使(Angel)',2: '大天使(Power Angel)',3:'权天使(Elite Angel)',4:'能天使(Crazy Angel)',5:'力天使(Insane Angel)',6:'主天使(Veteran Angel)',7:'座天使(Extreme Angel)',8:'智天使(Ultimate Angel)',9:'炽天使(Master Angel)',10:'壕(VIP)',11:'隐天使(Retiree)',12:'射种天使(Uploader)',13:'论坛版主(Forum Moderator)',14:'总版主(Moderator)',15:'管理员(Administrator)',16:'守护天使(Sysop)',17:'市长(Mayor)'})[query]"]
},
"bonus": {
"selector": ["div.text:contains('魅力值')", "div.text:contains('Karma'):contains('Points')"],
"filters": ["query.text().replace(/,/g,'').match(/(?:魅力值|Karma Points).+?([\\d.]+)/)", "(query && query.length>=2)?parseFloat(query[1]):null"]
},
"messageCount": {
"selector": ["li > a[href='messages']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
},
"joinTime": {
"selector": ["div.text:contains('加入日期')", "div.text:contains('Join'):contains('date')"],
"filters": ["query.text().match(/(?:加入日期|Join date)\\s+(.*)\\s\\(/)", "(query && query.length>=2) ? (dateTime(query[1]).isValid()?dateTime(query[1]).valueOf():query[1]) : null"]
}
}
},
"userSeedingTorrents": {
"page": "/getusertorrentlistajax?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["tr:not(:eq(0))"],
"filters": ["query.find('td.rowfollow:eq(2)').length"]
},
"seedingSize": {
"selector": ["tr:not(:eq(0))"],
"filters": ["jQuery.map(query.find('td.rowfollow:eq(2)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
}
}
}
}
}
================================================
FILE: resource/sites/hddolby.com/config.json
================================================
{
"name": "HD Dolby",
"timezoneOffset": "+0800",
"schema": "NexusPHP",
"url": "https://www.hddolby.com/",
"description": "高清杜比",
"icon": "https://www.hddolby.com/favicon.ico",
"tags": [
"影视",
"综合"
],
"host": "hddolby.com",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "2",
"downloaded": "120GB",
"ratio": "2.0",
"seedingPoints": "47040",
"privilege": "得到0个邀请名额;可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "4",
"downloaded": "256GB",
"ratio": "2.5",
"seedingPoints": "94080",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "8",
"downloaded": "512GB",
"ratio": "3.0",
"seedingPoints": "188160",
"privilege": "得到0个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "12",
"downloaded": "768GB",
"ratio": "3.5",
"seedingPoints": "282240",
"privilege": "无"
},
{
"level": 5,
"name": "Veteran User",
"interval": "16",
"downloaded": "1TB",
"ratio": "4.0",
"seedingPoints": "376320",
"privilege": "可以查看其它用户的评论、帖子历史。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "20",
"downloaded": "2TB",
"ratio": "4.5",
"seedingPoints": "470400",
"privilege": "Extreme User及以上用户会永远保留账号。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "24",
"downloaded": "4TB",
"ratio": "5.0",
"seedingPoints": "564480",
"privilege": "无"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "48",
"downloaded": "8TB",
"ratio": "5.5",
"seedingPoints": "1128960",
"privilege": "无"
}
],
"collaborator": ["iceyuamao0510", "tongyifan"],
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": [
"> td:eq(8)"
],
"filters": [
"query.text()==='-'?null:parseFloat(query.text().split('%')[0])"
]
},
"status": {
"selector": [
"> td:eq(8)"
],
"filters": [
"query.text()==='-'?null:(query.is(\"[bgcolor='#CC0066']\")?1:(parseFloat(query.text().split('%')[0])==100?(query.is(\"[bgcolor='#d0d0d0']\")?255:2):3))"
]
}
}
},
"searchEntry": [
{
"name": "全站",
"enabled": true
},
{
"queryString": "cat401=1",
"name": "Movies电影",
"enabled": false
},
{
"queryString": "cat402=1",
"name": "TV Series电视剧",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "Documentaries纪录片",
"enabled": false
},
{
"queryString": "cat405=1",
"name": "Animations动漫",
"enabled": false
},
{
"queryString": "cat403=1",
"name": "TV Shows综艺",
"enabled": false
},
{
"queryString": "cat406=1",
"name": "Music Videos",
"enabled": false
},
{
"queryString": "cat407=1",
"name": "Sports体育",
"enabled": false
},
{
"queryString": "cat408=1",
"name": "HQ Audio音乐",
"enabled": false
},
{
"queryString": "cat410=1",
"name": "Games游戏",
"enabled": false
},
{
"queryString": "cat411=1",
"name": "Study学习",
"enabled": false
},
{
"queryString": "cat409=1",
"name": "Others其他",
"enabled": false
}
],
"categories": [
{
"entry": "torrents.php",
"result": "&cat$id$=1",
"category": [
{
"id": 401,
"name": "Movies电影"
},
{
"id": 402,
"name": "TV Series电视剧"
},
{
"id": 404,
"name": "Documentaries纪录片"
},
{
"id": 405,
"name": "Animations动漫"
},
{
"id": 403,
"name": "TV Shows综艺"
},
{
"id": 406,
"name": "Music Videos"
},
{
"id": 407,
"name": "Sports体育"
},
{
"id": 408,
"name": "HQ Audio音乐"
},
{
"id": 410,
"name": "Games游戏"
},
{
"id": 411,
"name": "Study学习"
},
{
"id": 409,
"name": "Others其他"
}
]
}
],
"selectors": {
"/details.php": {
"merge": true,
"fields": {
"downloadURL": {
"selector": [
"a[href*='downhash']"
],
"filters": [
"query.attr('href')"
]
}
}
}
}
}
================================================
FILE: resource/sites/hdf.world/config.json
================================================
{
"name": "HD-Forever",
"timezoneOffset": "+0100",
"description": "HD-F",
"icon": "https://hdf.world/favicon.ico",
"schema": "GazelleJSONAPI",
"tags": ["影视", "综合"],
"url": "https://hdf.world/",
"collaborator": ["luckiestone"],
"host": "hdf.world",
"securityKeyFields": ["authkey", "torrent_pass"],
"searchEntryConfig": {
"skipIMDbId": true
},
"searchEntry": [{
"name": "all",
"enabled": true
}],
"selectors": {
"userBaseInfo": {
"page": "/ajax.php?action=index",
"dataType": "json",
"fields": {
"id": {
"selector": ["response.id"]
},
"name": {
"selector": ["response.username"]
},
"messageCount": {
"selector": ["response.notifications.messages"]
},
"uploaded": {
"selector": ["response.userstats.uploaded"]
},
"downloaded": {
"selector": ["response.userstats.downloaded"]
},
"ratio": {
"selector": ["response.userstats.ratio"]
},
"levelName": {
"selector": ["response.userstats.class"]
}
}
},
"userExtendInfo": {
"page": "/ajax.php?action=user&id=$user.id$",
"dataType": "json",
"fields": {
"joinTime": {
"selector": ["response.stats.joinedDate"],
"filters": ["dateTime(query).isValid()?dateTime(query).valueOf():query"]
},
"seeding": {
"selector": ["response.community.seeding"]
}
}
},
"userSeedingTorrents": {
"page": "/store.php?action=rate",
"fields": {
"seedingSize": {
"selector": ["table.torrent_table:first td.nobr"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
},
"bonus": {
"selector": "li#BonusPoints a[href*='store.php']",
"filters": ["query.text().replace(/,|\\n|\\s+/g,'')"]
}
}
}
},
"supportedFeatures": {
"imdbSearch": false
}
}
================================================
FILE: resource/sites/hdfans.org/config.json
================================================
{
"name": "HDFans",
"timezoneOffset": "+0800",
"description": "与志同道合之人前行 分享更多值得珍藏的资源",
"url": "https://hdfans.org",
"icon": "https://hdfans.org/favicon.ico",
"tags": ["综合", "电影", "电视剧", "纪录片"],
"schema": "NexusPHP",
"host": "hdfans.org",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.0",
"seedingPoints": "50000",
"privilege": "得到一个邀请名额;可以直接发布种子;可以删除自己上传的字幕"
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.5",
"seedingPoints": "100000",
"privilege": "无"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "256GB",
"ratio": "2.0",
"seedingPoints": "250000",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式"
},{
"level": "4",
"name": "Insane User",
"interval": "30",
"downloaded": "512GB",
"ratio": "2.5",
"seedingPoints": "400000",
"privilege": "可以查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "40",
"downloaded": "1TB",
"ratio": "3.0",
"seedingPoints": "600000",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史"
},{
"level": "6",
"name": "Extreme User",
"interval": "50",
"downloaded": "2TB",
"ratio": "3.5",
"seedingPoints": "800000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛;Extreme User及以上用户会永远保留账号"
},{
"level": "7",
"name": "Ultimate User",
"interval": "60",
"downloaded": "4TB",
"ratio": "4.0",
"seedingPoints": "1000000",
"privilege": "得到五个邀请名额"
},{
"level": "8",
"name": "Nexus Master",
"interval": "100",
"downloaded": "10TB",
"ratio": "5.0",
"seedingPoints": "1688888",
"privilege": "得到十个邀请名额"
}],
"collaborator": ["csi0n", "zhuweitung"],
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["b:first"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)0 ) ? query[0].replace('总大小:', '').replace('<', '').trim() : 0",
"(query != 0) ? _self.getTotalSize([query]) : 0"
]
}
}
}
},
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"],
"filters": ["query ? parseFloat(query.attr('title').match(/[\\d.]+/)) : null"]
},
"status": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"],
"filters": [
"query ? query.attr('title') : ''",
"query.indexOf('seeding') != -1 ? 2 : query.indexOf('leeching') != -1 ? 1 : query.indexOf('100%') != -1 ? 255 : 3"
]
}
}
}
}
================================================
FILE: resource/sites/hdhome.org/config.json
================================================
{
"name": "HDHome",
"timezoneOffset": "+0800",
"description": "HDHome",
"url": "https://hdhome.org/",
"icon": "https://hdhome.org/favicon.ico",
"tags": [
"影视",
"综合"
],
"schema": "NexusPHP",
"host": "hdhome.org",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "5",
"downloaded": "256GB",
"ratio": "2.0",
"seedingPoints": "40000",
"privilege": "无"
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "386GB",
"ratio": "2.5",
"seedingPoints": "100000",
"privilege": "无"
},{
"level": "3",
"name": "Crazy User",
"interval": "12",
"downloaded": "512GB",
"ratio": "3.0",
"seedingPoints": "180000",
"privilege": "可以在做种/下载/发布的时候选择匿名模式"
},{
"level": "4",
"name": "Insane User",
"interval": "16",
"downloaded": "768GB",
"ratio": "3.5",
"seedingPoints": "280000",
"privilege": "无"
},{
"level": "5",
"name": "Veteran User",
"interval": "20",
"downloaded": "1TB",
"ratio": "4.0",
"seedingPoints": "400000",
"privilege": "可以查看其它用户的评论、帖子历史"
},{
"level": "6",
"name": "Extreme User",
"interval": "24",
"downloaded": "2TB",
"ratio": "4.5",
"seedingPoints": "540000",
"privilege": "得到1个邀请名额,可以更新过期的外部信息,可以查看Extreme User论坛,账号封存后永久保留"
},{
"level": "7",
"name": "Ultimate User",
"interval": "30",
"downloaded": "8TB",
"ratio": "5.0",
"seedingPoints": "700000",
"privilege": "得到1个邀请名额,账号永久保留"
},{
"level": "8",
"name": "Nexus Master",
"interval": "36",
"downloaded": "10TB",
"ratio": "10",
"seedingPoints": "1000000",
"privilege": "得到1个邀请名额"
}],
"collaborator": ["tongyifan", "yuanyiwei"],
"plugins": [
{
"name": "种子列表",
"pages": [
"/live.php"
],
"scripts": [
"/schemas/NexusPHP/common.js",
"/schemas/NexusPHP/torrents.js"
]
}
],
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": [
"> td:eq(8)"
],
"filters": [
"query.text()==='-'?null:parseFloat(query.text().split('%')[0])"
]
},
"status": {
"selector": [
"> td:eq(8)"
],
"filters": [
"query.text()==='-'?null:(query.is(\"[bgcolor='#CC0066']\")?1:(parseFloat(query.text().split('%')[0])==100?(query.is(\"[bgcolor='#d0d0d0']\")?255:2):3))"
]
}
}
},
"searchEntry": [
{
"name": "种子",
"enabled": true
},
{
"entry": "/live.php?search=$key$¬newword=1",
"name": "LIVE",
"enabled": true
}
],
"categories": [
{
"entry": "torrents.php",
"result": "&cat$id$=1",
"category": [
{
"id": 411,
"name": "Movies SD"
},
{
"id": 412,
"name": "Movies IPad"
},
{
"id": 413,
"name": "Movies 720p"
},
{
"id": 414,
"name": "Movies 1080p"
},
{
"id": 415,
"name": "Movies REMUX"
},
{
"id": 450,
"name": "Movies Bluray"
},
{
"id": 499,
"name": "Movies UHD Blu-ray"
},
{
"id": 416,
"name": "Movies 2160p"
},
{
"id": 417,
"name": "Doc SD"
},
{
"id": 418,
"name": "Doc IPad"
},
{
"id": 419,
"name": "Doc 720p"
},
{
"id": 420,
"name": "Doc 1080p"
},
{
"id": 421,
"name": "Doc REMUX"
},
{
"id": 451,
"name": "Doc Bluray"
},
{
"id": 500,
"name": "Doc UHD Blu-ray"
},
{
"id": 422,
"name": "Doc 2160p"
},
{
"id": 423,
"name": "TVMusic 720p"
},
{
"id": 424,
"name": "TVMusic 1080i"
},
{
"id": 425,
"name": "TVShow SD"
},
{
"id": 426,
"name": "TVShow IPad"
},
{
"id": 471,
"name": "TVShow IPad"
},
{
"id": 427,
"name": "TVShow 720p"
},
{
"id": 428,
"name": "TVShow 1080i"
},
{
"id": 429,
"name": "TVShow 1080p"
},
{
"id": 430,
"name": "TVShow REMUX"
},
{
"id": 452,
"name": "TVShows Bluray"
},
{
"id": 431,
"name": "TVShow 2160p"
},
{
"id": 432,
"name": "TVSeries SD"
},
{
"id": 433,
"name": "TVSeries IPad"
},
{
"id": 434,
"name": "TVSeries 720p"
},
{
"id": 435,
"name": "TVSeries 1080i"
},
{
"id": 436,
"name": "TVSeries 1080p"
},
{
"id": 437,
"name": "TVSeries REMUX"
},
{
"id": 453,
"name": "TVSereis Bluray"
},
{
"id": 438,
"name": "TVSeries 2160p"
},
{
"id": 502,
"name": "TVSeries 4K Bluray"
},
{
"id": 439,
"name": "Musics APE"
},
{
"id": 440,
"name": "Musics FLAC"
},
{
"id": 441,
"name": "Musics MV"
},
{
"id": 442,
"name": "Sports 720p"
},
{
"id": 443,
"name": "Sports 1080i"
},
{
"id": 444,
"name": "Anime SD"
},
{
"id": 445,
"name": "Anime IPad"
},
{
"id": 446,
"name": "Anime 720p"
},
{
"id": 447,
"name": "Anime 1080p"
},
{
"id": 448,
"name": "Anime REMUX"
},
{
"id": 454,
"name": "Anime Bluray"
},
{
"id": 409,
"name": "Misc"
},
{
"id": 449,
"name": "Anime 2160p"
},
{
"id": 501,
"name": "Anime UHD Blu-ray"
}
]
},
{
"entry": "live.php",
"result": "&cat$id$=1",
"category": [
{
"id": 494,
"name": "Movies Bluray"
},
{
"id": 495,
"name": "Doc Bluray"
},
{
"id": 469,
"name": "TVMusic 1080i"
},
{
"id": 472,
"name": "TVShow 720p"
},
{
"id": 473,
"name": "TVShow 1080i"
},
{
"id": 474,
"name": "TVShow 1080p"
},
{
"id": 475,
"name": "TVShow REMUX"
},
{
"id": 496,
"name": "TVShows Bluray"
},
{
"id": 476,
"name": "TVShow 2160p"
},
{
"id": 477,
"name": "TVSeries SD"
},
{
"id": 478,
"name": "TVSeries IPad"
},
{
"id": 479,
"name": "TVSeries 720p"
},
{
"id": 480,
"name": "TVSeries 1080p"
},
{
"id": 481,
"name": "TVSeries REMUX"
},
{
"id": 497,
"name": "TVSereis Bluray"
},
{
"id": 482,
"name": "TVSeries 2160p"
},
{
"id": 483,
"name": "Musics APE"
},
{
"id": 484,
"name": "Musics FLAC"
},
{
"id": 485,
"name": "Musics MV"
},
{
"id": 486,
"name": "Sports 720p"
},
{
"id": 487,
"name": "Sports 1080i"
},
{
"id": 488,
"name": "Anime SD"
},
{
"id": 489,
"name": "Anime IPad"
},
{
"id": 490,
"name": "Anime 720p"
},
{
"id": 491,
"name": "Anime 1080p"
},
{
"id": 492,
"name": "Anime REMUX"
},
{
"id": 498,
"name": "Anime Bluray"
},
{
"id": 493,
"name": "Anime 2160p"
}
]
}
],
"selectors": {
"/details.php": {
"merge": true,
"fields": {
"downloadURL": {
"selector": ["a[href*='downhash']"],
"filters": ["query.attr('href')"]
}
}
}
}
}
================================================
FILE: resource/sites/hdmayi.com/config.json
================================================
{
"name": "HDmayi",
"timezoneOffset": "+0800",
"description": "HDmayi",
"url": "http://hdmayi.com/",
"icon": "http://hdmayi.com/favicon.ico",
"tags": [],
"schema": "NexusPHP",
"host": "hdmayi.com",
"levelRequirements":
[
{
"level": 1,
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"seedingPoints": "20000",
"privilege": "得到一个邀请名额;可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"seedingPoints": "40000",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"seedingPoints": "80000",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"seedingPoints": "120000",
"privilege": "可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"seedingPoints": "200000",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"seedingPoints": "300000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"seedingPoints": "400000",
"privilege": "得到五个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"seedingPoints": "1000000",
"privilege": "得到十个邀请名额。"
}
],
"collaborator": ["koal", "zhuweitung"],
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["b:first"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
},
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"],
"filters": ["query ? parseFloat(query.attr('title').match(/[\\d.]+/)) : null"]
},
"status": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"],
"filters": [
"query ? query.attr('title') : ''",
"query.indexOf('seeding') != -1 ? 2 : query.indexOf('leeching') != -1 ? 1 : query.indexOf('100%') != -1 ? 255 : 3"
]
}
}
}
}
================================================
FILE: resource/sites/hdpt.xyz/config.json
================================================
{
"name": "明教",
"timezoneOffset": "+0800",
"description": "综合性的PT论坛 欢迎您的加入!",
"url": "https://hdpt.xyz/",
"icon": "https://hdpt.xyz/favicon.ico",
"tags": ["影视", "综合"],
"schema": "NexusPHP",
"host": "hdpt.xyz",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"downloaded": "200GB",
"ratio": "2",
"seedingPoints": "50000",
"privilege": "得到一个邀请名额;可以直接发布种子;可以请求续种; 可以发送邀请。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "400GB",
"ratio": "3",
"seedingPoints": "110000",
"privilege": "得到一个邀请名额。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "700GB",
"ratio": "4",
"seedingPoints": "200000",
"privilege": "得到二个邀请名额。"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"downloaded": "1TB",
"ratio": "5",
"seedingPoints": "300000",
"privilege": "得到二个邀请名额;"
},
{
"level": 5,
"name": "Veteran User",
"interval": "40",
"downloaded": "2TB",
"ratio": "6",
"seedingPoints": "500000",
"privilege": "得到二个邀请名额。神蛇 (Veteran User)及以上等级的账号如果在封存后将保留,封存的账号如果连续400天不登录,将被封禁;未封存的账号如果连续90天不登录,将被封禁;没有流量的用户(即上传/下载数据都为0)如果连续90天不登录,将被封禁账号。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "60",
"downloaded": "3TB",
"ratio": "7",
"seedingPoints": "700000",
"privilege": "得到二个邀请名额;可以更新过期的外部信息;可以查看Extreme User论坛。紫微 (Extreme User)及以上用户会永远保留账号。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "80",
"downloaded": "4TB",
"ratio": "8",
"seedingPoints": "1000000",
"privilege": "得到五个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "100",
"downloaded": "8TB",
"ratio": "9",
"seedingPoints": "1500000",
"privilege": "得到七个邀请名额。"
}
],
"collaborator": ["koal", "zhuweitung"],
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
},
"searchEntry": [{
"name": "全站",
"enabled": true
},
{
"queryString": "cat401=1",
"name": "电影",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "纪录片",
"enabled": false
},
{
"queryString": "cat405=1",
"name": "动漫",
"enabled": false
},
{
"queryString": "cat402=1",
"name": "电视剧",
"enabled": false
},
{
"queryString": "cat403=1",
"name": "综艺",
"enabled": false
},
{
"queryString": "cat406=1",
"name": "MV",
"enabled": false
},
{
"queryString": "cat407=1",
"name": "体育",
"enabled": false
},
{
"queryString": "cat409=1",
"name": "其他",
"enabled": false
},
{
"queryString": "cat408=1",
"name": "音乐",
"enabled": false
},
{
"queryString": "cat410=1",
"name": "软件",
"enabled": false
},
{
"queryString": "cat411=1",
"name": "电子书",
"enabled": false
},
{
"queryString": "cat412=1",
"name": "卡通",
"enabled": false
},
{
"queryString": "cat413=1",
"name": "学习资料",
"enabled": false
}
],
"categories": [{
"entry": "torrents.php",
"result": "&cat$id$=1",
"category": [{
"id": 401,
"name": "电影"
},
{
"id": 404,
"name": "纪录片"
},
{
"id": 405,
"name": "动漫"
},
{
"id": 402,
"name": "电视剧"
},
{
"id": 403,
"name": "综艺"
},
{
"id": 406,
"name": "MV"
},
{
"id": 407,
"name": "体育"
},
{
"id": 409,
"name": "其他"
},
{
"id": 408,
"name": "音乐"
},
{
"id": 410,
"name": "软件"
},
{
"id": 411,
"name": "电子书"
},
{
"id": 412,
"name": "卡通"
},
{
"id": 413,
"name": "学习资料"
}
]
}],
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"],
"filters": ["query ? parseFloat(query.attr('title').match(/[\\d.]+/)) : null"]
},
"status": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"],
"filters": [
"query ? query.attr('title') : ''",
"query.indexOf('seeding') != -1 ? 2 : query.indexOf('leeching') != -1 ? 1 : query.indexOf('100%') != -1 ? 255 : 3"
]
}
}
}
}
================================================
FILE: resource/sites/hdroute.org/config.json
================================================
{
"name": "HDRoute",
"timezoneOffset": "+0800",
"description": "HDRoute",
"url": "http://hdroute.org/",
"icon": "http://hdroute.org/favicon.ico",
"tags": [
"影视",
"综合"
],
"host": "hdroute.org",
"plugins": [{
"name": "种子详情页面",
"pages": ["/details.php"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["/browse.php"],
"scripts": ["/schemas/NexusPHP/common.js", "torrents.js"]
}],
"searchEntryConfig": {
"page": "/browse.php",
"queryString": "s=$key$&dp=0&add=0&action=s&or=1",
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"queryString": "s=&dp=0&add=0&action=s&or=1&imdb=$key$",
"replaceKey": [
"tt", ""
]
}],
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "#unsticky-torrent-table dl"
},
"searchEntry": [{
"name": "全部",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "figure.sprite_dlp000"
}, {
"name": "~Free",
"selector": "figure.sprite_tempo_free",
"title": "title",
"color": "teal"
}, {
"name": "30%",
"selector": "figure.sprite_dlp030"
}, {
"name": "50%",
"selector": "figure.sprite_dlp050"
}, {
"name": "70%",
"selector": "figure.sprite_dlp070"
}],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"id": {
"selector": [".headerRightInfo a[href*='userdetail.php']"],
"attribute": "href",
"filters": ["query ? query.getQueryString('id'):''"]
},
"name": {
"selector": [".headerRightInfo a[href*='userdetail.php']"]
},
"bonus": {
"value": "N/A"
}
}
},
"userExtendInfo": {
"page": "/userdetail.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": [".headerRightInfo span:contains('上传量: ')"],
"filters": ["query.text().replace(/,/g,'').match(/上传量:.+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length==2)?(query[1]).sizeToNumber():0"]
},
"downloaded": {
"selector": [".headerRightInfo span:contains('下载量: ')"],
"filters": ["query.text().replace(/,/g,'').match(/下载量:.+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length==2)?(query[1]).sizeToNumber():0"]
},
"levelName": {
"selector": [".userdetail-list-title:contains('用户等级') + div"],
"filters": ["query.text().replace(' 级别', '')"]
},
"joinTime": {
"selector": [".userdetail-list-title:contains('注册日期') + div"],
"filters": ["query.text().trim()", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
},
"seeding": {
"selector": [".header-user-data a[href*='list_seeding.php']"],
"filters": ["query.text().trim()"]
},
"seedingSize": {
"selector": [".header-user-data a[href*='list_seeding.php']"],
"filters": ["query.next().text().match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length==2)?(query[1]).sizeToNumber():0"]
}
}
},
"userSeedingTorrents": {
"page": "/api.php?action=getAllPeeringInfo",
"dataType": "json",
"fields": {
"seedingList": {
"selector": ["seeding"],
"filters": ["let r=[];query.forEach(q=>{r.push(q.torrentid)});r"]
}
}
}
}
}
================================================
FILE: resource/sites/hdroute.org/details.js
================================================
(function($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
let query = $("button.buttonDownload");
let url = "";
if (query.length > 0) {
let id = location.href.getQueryString("id");
if (id) {
url = PTService.site.url + "download.php?id=" + id;
}
}
return url;
}
/**
* 获取当前种子标题
*/
getTitle() {
return $(".details-title-section > p:first")
.text()
.trim();
}
}
new App().init();
})(jQuery, window);
================================================
FILE: resource/sites/hdroute.org/getSearchResult.js
================================================
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
if (/loginSection/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
if (/对不起,没有您搜索的相关结果/.test(options.responseText)) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let site = options.site;
let selector = options.resultSelector;
let rows = options.page.find(selector);
let results = [];
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
try {
// 遍历数据行
for (let index = 0; index < rows.length; index++) {
const row = rows.eq(index);
let id = row.attr("id").replace("dl_torrent_", "");
let url = `${site.url}download.php?id=${id}`;
let link = `${site.url}details.php?id=${id}`;
let data = {
id,
title: row.find(".title_chs").text(),
subTitle: row.find(".title_eng").text(),
link,
url,
size: row.find(".torrent_size").text(),
time: this.getTime(row.find(".torrent_added")),
author: "",
seeders: this.getTorrentCount(
row
.find(".torrent_count.strong")
.eq(0)
.text()
),
leechers: this.getTorrentCount(
row
.find(".torrent_count.strong")
.eq(1)
.text()
),
completed: -1,
comments: 0,
site: site,
tags: Searcher.getRowTags(site, row),
entryName: options.entry.name,
category: null
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
}
} catch (error) {
console.log(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.stack}`;
}
return results;
}
getTorrentCount(text) {
return text == "---" ? 0 : text;
}
/**
* 获取时间
* @param {*} el
*/
getTime(el) {
let time = $("")
.html(el.html().replace(" ", " "))
.text();
return time || "";
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/sites/hdroute.org/torrents.js
================================================
(function($) {
console.log("this is torrent.js");
class App extends window.NexusPHPCommon {
init() {
// super();
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $(
"#unsticky-torrent-table dl:has(.buttonDownload)"
).toArray();
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (links.length == 0) {
return this.t("getDownloadURLsFailed"); //"获取下载链接失败,未能正确定位到链接";
}
let urls = $.map(links, item => {
let id = $(item)
.attr("id")
.replace("dl_torrent_", "");
let link = `${siteURL}download.php?id=${id}`;
return link;
});
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("#unsticky-torrent-table dl:has(.buttonDownload) .torrent_size")
);
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/hdsky.me/config.json
================================================
{
"name": "HDSky",
"timezoneOffset": "+0800",
"description": "高清发烧友后花园PT",
"url": "https://hdsky.me/",
"icon": "https://hdsky.me/favicon.ico",
"tags": [
"影视",
"纪录片",
"综合"
],
"schema": "NexusPHP",
"host": "hdsky.me",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "5",
"downloaded": "200GB",
"ratio": "2.0",
"privilege": "NFO文档;请求续种;查看其它用户的种子历史;删除自己上传的字幕"
},{
"level": "2",
"name": "Elite User",
"interval": "10",
"downloaded": "500GB",
"ratio": "2.5",
"privilege": "查看邀请区"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "1TB",
"ratio": "3.0",
"privilege": "在做种/下载/发布的时候选择匿名模式"
},{
"level": "4",
"name": "Insane User",
"interval": "20",
"downloaded": "2TB",
"ratio": "3.5",
"privilege": "查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "25",
"downloaded": "4TB",
"ratio": "4.0",
"privilege": "封存账号后不会被删除;查看其它用户的评论、帖子历史"
},{
"level": "6",
"name": "Extreme User",
"interval": "30",
"downloaded": "6TB",
"ratio": "4.5",
"privilege": "更新过期的外部信息;查看Extreme User论坛"
},{
"level": "7",
"name": "Ultimate User",
"interval": "45",
"downloaded": "8TB",
"ratio": "5.0",
"privilege": "永远保留账号"
},{
"level": "8",
"name": "Nexus Master",
"interval": "65",
"downloaded": "10TB",
"ratio": "5.5",
"privilege": "直接发布种子;可以查看排行榜;在网站开放邀请期间发送邀请"
}],
"searchEntry": [{
"name": "全部",
"enabled": true
},
{
"queryString": "cat401=1",
"name": "Movies/电影",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "Documentaries/纪录片",
"enabled": false
},
{
"queryString": "cat410=1",
"name": "iPad/iPad影视",
"enabled": false
},
{
"queryString": "cat405=1",
"name": "Animations/动漫",
"enabled": false
},
{
"queryString": "cat402=1",
"name": "TV Series/剧集",
"enabled": false
},
{
"queryString": "cat403=1",
"name": "TV Shows/综艺",
"enabled": false
},
{
"queryString": "cat406=1",
"name": "Music Videos/音乐MV",
"enabled": false
},
{
"queryString": "cat407=1",
"name": "Sports/体育",
"enabled": false
},
{
"queryString": "cat408=1",
"name": "HQ Audio/无损音乐",
"enabled": false
},
{
"queryString": "cat409=1",
"name": "Misc/其他",
"enabled": false
}
],
"categories": [{
"entry": "*",
"result": "&cat$id$=1",
"category": [{
"id": 401,
"name": "Movies/电影"
},
{
"id": 404,
"name": "Documentaries/纪录片"
},
{
"id": 410,
"name": "iPad/iPad影视"
},
{
"id": 405,
"name": "Animations/动漫"
},
{
"id": 402,
"name": "TV Series/剧集"
},
{
"id": 403,
"name": "TV Shows/综艺"
},
{
"id": 406,
"name": "Music Videos/音乐MV"
},
{
"id": 407,
"name": "Sports/体育"
},
{
"id": 408,
"name": "HQ Audio/无损音乐"
},
{
"id": 409,
"name": "Misc/其他"
}
]
}],
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["div.progressseeding, div.progressfinished, div.progressdownloading, div.progressdownloaded, div.progressuploaded"],
"filters": ["query.attr('style')||''", "query.match(/width:([ \\d.]+)%/)", "(query && query.length>=2)?query[1]:null"]
},
"status": {
"selector": ["div.progressseeding", "div.progressfinished", "div.progressdownloading", "div.progressdownloaded", "div.progressuploaded[title='由我上传 ']", "div.progressuploaded[title='由我上传 , 正在做种 ']"],
"switchFilters": [
["2"],
["255"],
["1"],
["255"],
["255"],
["2"]
]
}
}
},
"selectors": {
"/torrents.php": {
"merge": true,
"fields": {
"downloadURLs": {
"selector": "input.download",
"filters": ["query.map(function() {return jQuery(this).parent().attr('action')}).toArray()"]
}
}
},
"/details.php": {
"merge": true,
"fields": {
"downloadURL": {
"selector": "td.rowfollow a:contains('passkey')",
"filters": ["query.attr('href')"]
}
}
}
}
}
================================================
FILE: resource/sites/hdtime.org/config.json
================================================
{
"name": "HDTime",
"timezoneOffset": "+0800",
"description": "HDTime, time to forever!",
"url": "https://hdtime.org/",
"icon": "https://hdtime.org/favicon.ico",
"tags": ["影视", "综合"],
"schema": "NexusPHP",
"host": "hdtime.org",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"seedingPoints": "40000",
"privilege": "得到一个邀请名额;可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种;可以发送邀请;可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\");可以删除自己上传的字幕"
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "150GB",
"ratio": "1.55",
"seedingPoints": "80000",
"privilege": "Elite User及以上用户封存账号后不会被删除"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "500GB",
"ratio": "2.05",
"seedingPoints": "150000",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式"
},{
"level": "4",
"name": "Insane User",
"interval": "25",
"downloaded": "750GB",
"ratio": "2.55",
"seedingPoints": "250000",
"privilege": "可以查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "40",
"downloaded": "1.5TB",
"ratio": "3.05",
"seedingPoints": "400000",
"privilege": "免除增量考核;得到三个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号"
},{
"level": "6",
"name": "Extreme User",
"interval": "60",
"downloaded": "3TB",
"ratio": "3.55",
"seedingPoints": "600000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛"
},{
"level": "7",
"name": "Ultimate User",
"interval": "80",
"downloaded": "5TB",
"ratio": "4.05",
"seedingPoints": "800000",
"privilege": "得到五个邀请名额"
},{
"level": "8",
"name": "Nexus Master",
"interval": "100",
"downloaded": "10TB",
"ratio": "5.05",
"seedingPoints": "1000000",
"privilege": "得到十个邀请名额"
}],
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["b:first"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
},
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["div[title*='seeding']", "div[title*='inactivity']", ""],
"switchFilters": [
["100"],
[
"query.attr('title').split(' ')",
"query[1]?parseInt(query[1].substr(0,query[1].length-1)):undefined"
],
["undefined"]
]
},
"status": {
"selector": ["div[title*='seeding']", "div[title*='inactivity']", ""],
"switchFilters": [["2"], ["3"], ["undefined"]]
}
}
},
"searchEntry": [
{
"name": "全站",
"enabled": true
},
{
"queryString": "cat401=1",
"name": "电影",
"enabled": false
},
{
"queryString": "cat424=1",
"name": "Blu-Ray原盘",
"enabled": false
},
{
"queryString": "cat402=1",
"name": "剧集",
"enabled": false
},
{
"queryString": "cat403=1",
"name": "综艺",
"enabled": false
},
{
"queryString": "cat405=1",
"name": "动漫",
"enabled": false
},
{
"queryString": "cat414=1",
"name": "软件",
"enabled": false
},
{
"queryString": "cat407=1",
"name": "体育",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "纪录片",
"enabled": false
},
{
"queryString": "cat406=1",
"name": "MV",
"enabled": false
},
{
"queryString": "cat408=1",
"name": "音乐",
"enabled": false
},
{
"queryString": "cat410=1",
"name": "游戏",
"enabled": false
},
{
"queryString": "cat411=1",
"name": "文档",
"enabled": false
},
{
"queryString": "cat409=1",
"name": "其他",
"enabled": false
}
],
"categories": [
{
"entry": "torrents.php",
"result": "&cat$id$=1",
"category": [
{
"id": 401,
"name": "电影"
},
{
"id": 424,
"name": "Blu-Ray原盘"
},
{
"id": 402,
"name": "剧集"
},
{
"id": 403,
"name": "综艺"
},
{
"id": 405,
"name": "动漫"
},
{
"id": 414,
"name": "软件"
},
{
"id": 407,
"name": "体育"
},
{
"id": 404,
"name": "纪录片"
},
{
"id": 406,
"name": "MV"
},
{
"id": 408,
"name": "音乐"
},
{
"id": 410,
"name": "游戏"
},
{
"id": 411,
"name": "文档"
},
{
"id": 409,
"name": "其他"
}
]
}
]
}
================================================
FILE: resource/sites/hdvideo.one/config.json
================================================
{
"name": "HDVideo",
"timezoneOffset": "+0800",
"description": "HDVideo",
"url": "https://hdvideo.one/",
"icon": "https://hdvideo.one/favicon.ico",
"tags": [],
"schema": "NexusPHP",
"host": "hdvideo.one",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"downloaded": "128GB",
"ratio": "2.0",
"seedingPoints": "60480",
"privilege": "得到一个邀请名额;可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "256GB",
"ratio": "2.5",
"seedingPoints": "137088",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "12",
"downloaded": "512GB",
"ratio": "3.0",
"seedingPoints": "262080",
"privilege": "可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "18",
"downloaded": "1TB",
"ratio": "3.5",
"seedingPoints": "453600",
"privilege": "得到两个邀请名额;可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "24",
"downloaded": "2TB",
"ratio": "4.0",
"seedingPoints": "604800",
"privilege": "可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "32",
"downloaded": "4TB",
"ratio": "4.5",
"seedingPoints": "806400",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "40",
"downloaded": "6TB",
"ratio": "5.0",
"seedingPoints": "1008000",
"privilege": "得到三个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "52",
"downloaded": "8TB",
"ratio": "5.5",
"seedingPoints": "1310400",
"privilege": "得到五个邀请名额。"
}
],
"collaborator": "koal",
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/hdzone.me/config.json
================================================
{
"name": "HDZone",
"description": "",
"url": "https://hdzone.me/",
"icon": "https://hdzone.me/favicon.ico",
"tags": [
"电影"
],
"schema": "NexusPHP",
"host": "hdzone.me",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "5",
"downloaded": "120GB",
"ratio": "2.0",
"privilege": "新晋等级用户,只能在每周六中午12点至每周日晚上11点59分发布种子。"
},{
"level": "2",
"name": "Elite User",
"interval": "5",
"downloaded": "220GB",
"ratio": "2.5",
"privilege": "Elite User权限同上。"
},{
"level": "3",
"name": "Crazy User",
"interval": "10",
"downloaded": "400GB",
"ratio": "3.0",
"privilege": "可以在做种/下载/发布的时候选择匿名模式。"
},{
"level": "4",
"name": "Insane User",
"interval": "10",
"downloaded": "600GB",
"ratio": "3.5",
"privilege": "可以查看普通日志。"
},{
"level": "5",
"name": "Veteran User",
"interval": "10",
"downloaded": "900GB",
"ratio": "4.0",
"privilege": "可以查看其它用户的评论、帖子历史。"
},{
"level": "6",
"name": "Extreme User",
"interval": "10",
"downloaded": "2TB",
"ratio": "4.5",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
},{
"level": "7",
"name": "Ultimate User",
"interval": "10",
"downloaded": "4TB",
"ratio": "5.0",
"privilege": "得到2个邀请名额。"
},{
"level": "8",
"name": "Nexus Master",
"interval": "10",
"downloaded": "8TB",
"ratio": "5.5",
"privilege": "得到3个邀请名额。账号永久保留。"
}],
"collaborator": "ian",
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": [
"> td:eq(8)"
],
"filters": [
"query.text()==='-'?null:parseFloat(query.text())"
]
},
"status": {
"selector": [
""
],
"filters": [
"3"
]
}
}
}
}
================================================
FILE: resource/sites/hhanclub.top/config.json
================================================
{
"name": "憨憨",
"timezoneOffset": "+0800",
"description": "憨憨",
"url": "https://hhanclub.top/",
"icon": "https://hhanclub.top/favicon.ico",
"tags": [],
"schema": "NexusPHP",
"host": "hhanclub.top",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"seedingPoints": "80000",
"privilege": "得到一个邀请名额;可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"seedingPoints": "150000",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"seedingPoints": "400000",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"seedingPoints": "500000",
"privilege": "可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"seedingPoints": "900000",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"seedingPoints": "1100000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"seedingPoints": "1300000",
"privilege": "得到五个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"seedingPoints": "1500000",
"privilege": "得到十个邀请名额。"
}
],
"collaborator": ["koal", "zhuweitung"],
"selectors": {
"userExtendInfo": {
"merge": true,
"fields": {
"bonus": {
"selector": ["td.rowhead:contains('憨豆') + td", "td.rowhead:contains('Seed points') + td"],
"filters": ["parseFloat(query.text().replace(/,/g,''))"]
}
}
},
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
},
"bonusExtendInfo": {
"prerequisites": "!user.bonusPerHour",
"page": "/mybonus.php",
"fields": {
"bonusPerHour": {
"selector": ["h1:contains('每小时获得的合计憨豆') + div table tr:eq(1) td:last", "h1:contains('Total bonus gained per hour') + div table tr:eq(1) td:last"],
"filters": ["parseFloat(query.text().match(/[\\d.]+/)[0])"]
}
}
}
},
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(0) > div:last"],
"filters": ["query ? parseFloat(query.attr('title').match(/[\\d.]+/)) : null"]
},
"status": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(0) > div:last"],
"filters": [
"query ? query.attr('title') : ''",
"query.indexOf('seeding') != -1 ? 2 : query.indexOf('leeching') != -1 ? 1 : query.indexOf('100%') != -1 ? 255 : 3"
]
}
}
}
}
================================================
FILE: resource/sites/htpt.cc/config.json
================================================
{
"name": "海棠PT",
"timezoneOffset": "+0800",
"schema": "NexusPHP",
"url": "https://www.htpt.cc",
"description": "主打曲艺、戏曲、相声、评书、小品、广播剧、有声小说等中国传统有声资源",
"icon": "https://www.htpt.cc/favicon.ico",
"tags": [
"曲艺",
"小品",
"有声小说"
],
"host": "htpt.cc",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"privilege": "得到一个邀请名额。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"privilege": "得到一个邀请名额,且Elite User及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"privilege": "得到一个邀请名额。"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"privilege": "得到一个邀请名额。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"privilege": "得到一个邀请名额,且Veteran User及以上用户会永远保留账号。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"privilege": "得到一个邀请名额,可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"privilege": "得到一个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"privilege": "得到一个邀请名额。"
}
],
"collaborator": [
"sabersalv",
"amorphobia"
],
"supportedFeatures": {
"imdbSearch": false
},
"searchEntryConfig": {
"skipIMDbId": true
},
"selectors": {
"bonusExtendInfo": {
"prerequisites": "!user.bonusPerHour",
"page": "/mybonus_new.php",
"merge": true
}
},
"plugins": [
{
"name": "种子列表",
"pages": [
"/torrents.php",
"/live.php"
],
"scripts": [
"/schemas/NexusPHP/common.js",
"/schemas/NexusPHP/torrents.js"
]
},
{
"name": "种子详情页面",
"pages": [
"/details.php"
],
"scripts": [
"/schemas/NexusPHP/common.js",
"/schemas/NexusPHP/details.js"
]
}
]
}
================================================
FILE: resource/sites/hudbt.hust.edu.cn/config.json
================================================
{
"name": "蝴蝶-HUDBT",
"timezoneOffset": "+0800",
"description": "HUDBT,教育网高速IPv6BT下载站。",
"url": "https://hudbt.hust.edu.cn/",
"icon": "https://hudbt.hust.edu.cn/favicon.ico",
"tags": [
"教育网",
"影视",
"综合"
],
"schema": "NexusPHP",
"host": "hudbt.hust.edu.cn",
"collaborator": ["Rhilip", "枕头啊枕头","Yincircle"],
"levelRequirements": [{
"level": "1",
"name": "易形(Power User)",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"privilege": "得到一个邀请名额;可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},{
"level": "2",
"name": "化蛹(Elite User)",
"interval": "9",
"downloaded": "120GB",
"ratio": "1.55",
"privilege": "化蛹(Elite User)及以上用户封存账号后不会被删除。"
},{
"level": "3",
"name": "破茧(Crazy User)",
"interval": "16",
"downloaded": "300GB",
"ratio": "2.05",
"privilege": "得到一个邀请名额; 可以发送邀请(注意:网站会视情况提高或者降低允许发送邀请的最低等级,此处不一定会及时修改);可以在做种/下载/发布的时候选择匿名模式。"
},{
"level": "4",
"name": "恋风(Insane User)",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"privilege": "可以查看普通日志。"
},{
"level": "5",
"name": "翩跹(Veteran User)",
"interval": "36",
"downloaded": "750GB",
"ratio": "3.05",
"privilege": "得到一个邀请名额;可以查看其它用户的评论、帖子历史。翩跹(Veteran User)及以上用户会永远保留账号。"
},{
"level": "6",
"name": "归尘(Extreme User)",
"interval": "49",
"downloaded": "1TB",
"ratio": "3.55",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。(未启用)"
},{
"level": "7",
"name": "幻梦(Ultimate User)",
"interval": "64",
"downloaded": "1.5TB",
"ratio": "4.05",
"privilege": ""
},{
"level": "8",
"name": "逍遥(Nexus Master)",
"interval": "81",
"downloaded": "3TB",
"ratio": "4.55",
"privilege": ""
}],
"searchEntry": [{
"name": "全站",
"enabled": true
},
{
"queryString": "cat1=1&cat401=1&cat413=1&cat414=1&cat415=1&cat430=1",
"name": "电影",
"enabled": false
},
{
"queryString": "cat2=1&cat402=1&cat417=1&cat416=1&cat418=1",
"name": "剧集",
"enabled": false
},
{
"queryString": "cat3=1&cat405=1&cat427=1&cat428=1&cat429=1",
"name": "动漫",
"enabled": false
},
{
"queryString": "cat4=1&cat410=1&cat431=1",
"name": "游戏",
"enabled": false
},
{
"queryString": "cat5=1&cat403=1&cat419=1&cat420=1&cat421=1",
"name": "综艺",
"enabled": false
},
{
"queryString": "cat6=1&cat409=1&cat412=1",
"name": "资料",
"enabled": false
},
{
"queryString": "cat7=1&cat407=1",
"name": "体育",
"enabled": false
},
{
"queryString": "cat8=1&cat408=1&cat422=1&cat423=1&cat424=1&cat425=1",
"name": "音乐",
"enabled": false
},
{
"queryString": "cat9=1&cat404=1",
"name": "纪录片",
"enabled": false
},
{
"queryString": "cat10=1&cat411=1&cat426=1",
"name": "软件",
"enabled": false
},
{
"queryString": "cat11=1&cat406=1",
"name": "MV",
"enabled": false
},
{
"queryString": "cat12=1&cat432=1",
"name": "电子书",
"enabled": false
},
{
"queryString": "cat13=1&cat1037=1",
"name": "华中科技大学",
"enabled": false
}
],
"categories": [{
"entry": "torrents.php",
"result": "&cat$id$=1",
"category": [{
"id": 401,
"name": "大陆电影"
},
{
"id": 413,
"name": "港台电影"
},
{
"id": 414,
"name": "亚洲电影"
},
{
"id": 415,
"name": "欧美电影"
},
{
"id": 430,
"name": "iPad"
},
{
"id": 433,
"name": "抢先视频"
},
{
"id": 402,
"name": "大陆剧集"
},
{
"id": 417,
"name": "港台剧集"
},
{
"id": 416,
"name": "亚洲剧集"
},
{
"id": 418,
"name": "欧美剧集"
},
{
"id": 404,
"name": "纪录片"
},
{
"id": 407,
"name": "体育"
},
{
"id": 403,
"name": "大陆综艺"
},
{
"id": 419,
"name": "港台综艺"
},
{
"id": 420,
"name": "亚洲综艺"
},
{
"id": 421,
"name": "欧美综艺"
},
{
"id": 408,
"name": "华语音乐"
},
{
"id": 422,
"name": "日韩音乐"
},
{
"id": 423,
"name": "欧美音乐"
},
{
"id": 424,
"name": "古典音乐"
},
{
"id": 425,
"name": "原声音乐"
},
{
"id": 406,
"name": "音乐MV"
},
{
"id": 409,
"name": "其他"
},
{
"id": 432,
"name": "电子书"
},
{
"id": 405,
"name": "完结动漫"
},
{
"id": 427,
"name": "连载动漫"
},
{
"id": 428,
"name": "剧场OVA"
},
{
"id": 429,
"name": "动漫周边"
},
{
"id": 410,
"name": "游戏"
},
{
"id": 431,
"name": "游戏视频"
},
{
"id": 411,
"name": "软件"
},
{
"id": 412,
"name": "学习"
},
{
"id": 426,
"name": "MAC"
},
{
"id": 1037,
"name": "HUST"
}
]
}]
}
================================================
FILE: resource/sites/ihdbits.me/config.json
================================================
{
"name": "ihdbits",
"schema": "NexusPHP",
"url": "http://ihdbits.me/",
"description": "The Ultimate File Sharing Experience",
"icon": "http://ihdbits.me/favicon.ico",
"tags": [
"影视"
],
"host": "ihdbits.me",
"collaborator": "koal",
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["b:first"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/iptorrents.com/config.json
================================================
{
"name": "IPTorrents",
"timezoneOffset": "+0000",
"description": "IPTorrents - #1 Private Tracker",
"url": "https://iptorrents.com/",
"icon": "https://iptorrents.com/favicon.ico",
"tags": ["综合"],
"schema": "IPTorrents",
"host": "iptorrents.com",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"uploaded": "50GB",
"ratio": "1.05",
"privilege": "Are able to make requests for torrents, view the Top 10, and apply for Uploader status"
}
],
"supportedFeatures": {
"userData": "◐"
},
"plugins": [{
"name": "种子详情页面",
"pages": ["/torrent.php"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["^/t$"],
"scripts": ["/schemas/NexusPHP/common.js", "torrents.js"]
}],
"searchEntry": [{
"entry": "/t?q=$key$",
"name": "全部",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "table#torrents:first",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "span.t_tag_free_leech"
}],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"id": {
"selector": ["a[href*='/u/']:first", "a[href*='userdetails.php']:first"],
"attribute": "href",
"switchFilters": [
["query.match(/u\\/(.+)/)", "(query && query.length>=2)?(query[1]):''"],
["query ? query.getQueryString('id'):''"]
]
},
"isLogged": {
"selector": ["a[href*='logout.php']", "form[action*='lout']"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["td[style*='background: red'] a[href*='messages.php']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"name": {
"selector": ["h1.c0"]
},
"uploaded": {
"selector": ["th:contains('Uploaded') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
},
"downloaded": {
"selector": ["th:contains('Downloaded') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
},
"ratio": {
"selector": "th:contains('Share ratio') + td",
"filters": ["query.text().replace(/,/g,'')"]
},
"levelName": {
"selector": "th:contains('Class') + td"
},
"bonus": {
"selector": ["a[href='/mybonus.php']"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+)/)", "(query && query.length>=2)?query[1]:''"]
},
"joinTime": {
"selector": "th:contains('Join date') + td",
"filters": ["query.text().split(' (')[0]", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
},
"seeding": {
"selector": ["th:contains('Seeding') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d]+)/)", "(query && query.length>=2)?query[1]:''"]
},
"seedingSize": {
"value": -1
}
}
},
"/details.php": {
"fields": {
"size": {
"selector": ["th.ar:contains('Size') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"]
}
}
}
}
}
================================================
FILE: resource/sites/iptorrents.com/details.js
================================================
(function ($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
let query = $("a[href*='download.php/']:first");
let url = "";
if (query.length > 0) {
url = query.attr("href");
if (url.substr(0, 4) != "http") {
url = PTService.site.url + url;
}
}
return url;
}
};
(new App()).init();
})(jQuery, window);
================================================
FILE: resource/sites/iptorrents.com/getSearchResult.js
================================================
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
if (/\/login/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let site = options.site;
let selector =
options.resultSelector || "div.table-responsive > table:first";
let table = options.page.find(selector);
// 获取种子列表行
let rows = table.find("> tbody > tr");
if (rows.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return [];
}
let results = [];
// 获取表头
let header = table.find("> thead > tr > th");
let beginRowIndex = 0;
if (header.length == 0) {
beginRowIndex = 1;
header = rows.eq(0).find("th,td");
}
// 用于定位每个字段所列的位置
let fieldIndex = {
// 发布时间
time: -1,
// 大小
size: -1,
// 上传数量
seeders: -1,
// 下载数量
leechers: -1,
// 完成数量
completed: -1,
// 评论数量
comments: -1,
// 发布人
author: header.length - 1,
// 分类
category: 0
};
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
// 获取字段所在的列
for (let index = 0; index < header.length; index++) {
let cell = header.eq(index);
let text = cell.text();
// 评论数
if (cell.find("a[href*='comments']").length) {
fieldIndex.comments = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 大小
if (cell.find("a[href*='size']").length) {
fieldIndex.size = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 种子数
if (cell.find("a[href*='seeders']").length) {
fieldIndex.seeders = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 下载数
if (cell.find("a[href*='leechers']").length) {
fieldIndex.leechers = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 完成数
if (cell.find("a[href*='complete']").length) {
fieldIndex.completed = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 分类
if (text == "Type") {
fieldIndex.category = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
}
try {
// 遍历数据行
for (let index = beginRowIndex; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = row.find(
"a[href*='details.php']:not([href*='startcomments']):first"
);
if (title.length == 0) {
title = row.find("a[href*='/t/']:first");
}
if (title.length == 0) {
continue;
}
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
// 获取下载链接
let url = row.find("a[href*='/download.php']").attr("href");
if (url.length == 0) {
continue;
}
if (url && url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
let data = {
title: title.text(),
subTitle: "",
link,
url: url,
size:
cells
.eq(fieldIndex.size)
.text()
.trim() || 0,
time: this.getTime(row),
author:
fieldIndex.author == -1
? ""
: cells.eq(fieldIndex.author).text() || "",
seeders:
fieldIndex.seeders == -1
? ""
: cells.eq(fieldIndex.seeders).text() || 0,
leechers:
fieldIndex.leechers == -1
? ""
: cells.eq(fieldIndex.leechers).text() || 0,
completed:
fieldIndex.completed == -1
? ""
: cells.eq(fieldIndex.completed).text() || 0,
comments:
fieldIndex.comments == -1
? ""
: cells.eq(fieldIndex.comments).text().replace("Go to comments","") || 0,
site: site,
tags: Searcher.getRowTags(site, row),
entryName: options.entry.name,
category:
fieldIndex.category == -1
? null
: this.getCategory(cells.eq(fieldIndex.category))
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
}
} catch (error) {
console.log(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.stack}`;
}
return results;
}
getTime(row) {
let text = row.find("td.al div.sub").text();
if (text) {
if (text.indexOf("|") > 0) {
text=text.split("|")[1];
if (text.indexOf("by") > 0) {
return text.split("|")[0].trim();
}
}
}
return text;
}
/**
* 获取副标题
* @param {*} title
* @param {*} row
*/
getSubTitle(title, row) {
return "";
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: cell.find("img:first").attr("alt"),
link: ""
};
return result;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/sites/iptorrents.com/torrents.js
================================================
(function($) {
console.log("this is torrent.js");
class App extends window.NexusPHPCommon {
init() {
// super();
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $("table#torrents:first, table#torrentTable:first")
.find("a[href*='/download.php/']")
.toArray();
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (links.length == 0) {
return this.t("getDownloadURLsFailed"); //"获取下载链接失败,未能正确定位到链接";
}
let urls = $.map(links, item => {
let link = $(item).attr("href");
if (link && link.substr(0, 4) != "http") {
link = siteURL + link;
}
return link;
});
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("table#torrents:first, table#torrentTable:first").find(
"td:contains('MiB'),td:contains('GiB'),td:contains('TiB')"
)
);
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/joyhd.net/config.json
================================================
{
"name": "JoyHD",
"timezoneOffset": "+0800",
"description": "JoyHD成立於2013年,發佈藍光原碟,藍光DIY和原抓音樂。",
"url": "https://www.joyhd.net",
"icon": "https://www.joyhd.net/favicon.ico",
"tags": ["影视", "综合"],
"schema": "NexusPHP",
"host": "joyhd.net",
"collaborator": "ylxb2016",
"selectors": {
"userExtendInfo": {
"merge": true,
"fields": {
"bonus": {
"selector": ["td.rowhead:contains('银元') + td"],
"filters": ["query.text().replace(/,/g,'')", "parseFloat(query)"]
}
}
}
}
}
================================================
FILE: resource/sites/jpopsuki.eu/config.json
================================================
{
"name": "JPopsuki",
"timezoneOffset": "+0000",
"description": "日韩音乐",
"url": "https://jpopsuki.eu/",
"icon": "https://jpopsuki.eu/favicon.ico",
"tags": ["音乐", "日韩"],
"schema": "Gazelle",
"host": "jpopsuki.eu",
"collaborator": [
"ronggang",
"ted423",
"luckiestone",
"amorphobia"
],
"levelRequirements": [
{
"level": 1,
"name": "Member",
"interval": "1",
"uploaded": "10GB",
"ratio": "0.7",
"downloaded": "1KB",
"privilege": "Can use invites, notifications, set a forum signature, access the Top 10 and edit the Knowledge base."
},
{
"level": 2,
"name": "Power User",
"interval": "2",
"uploaded": "25GB",
"ratio": "1.05",
"downloaded": "1KB",
"uploads": "5",
"privilege": "advanced Top 10, can view torrent snatched list, edit torrent's description, original title and release date and access the advanced user search. Receives a new invite once per month (up to a maximum of 10 available invites)."
}
],
"searchEntryConfig": {
"skipIMDbId": true
},
"plugins": [{
"name": "种子列表",
"pages": ["/artist.php"],
"scripts": ["/schemas/NexusPHP/common.js", "torrents.js"]
}],
"searchEntry": [{
"entry": "/torrents.php?searchstr=$key$&searchsubmit=1",
"name": "all",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "table.torrent_table:last > tbody > tr",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "strong:contains('Freeleech!')"
}],
"categories": [{
"entry": "*",
"result": "&filter_cat[$id$]=1",
"category": [{
"id": 1,
"name": "Album"
}, {
"id": 2,
"name": "Single"
}, {
"id": 3,
"name": "PV"
}, {
"id": 4,
"name": "DVD"
}, {
"id": 5,
"name": "TV-Music"
}, {
"id": 6,
"name": "TV-Variety"
}, {
"id": 7,
"name": "TV-Drama"
}, {
"id": 8,
"name": "Fansubs"
}, {
"id": 9,
"name": "Pictures"
}, {
"id": 10,
"name": "Misc"
}]
}],
"selectors": {
"userExtendInfo": {
"merge": true,
"fields": {
"uploaded": {
"selector": "div:contains('Stats') + ul.stats > li:contains('Uploaded'), div:contains('統計情報') + ul.stats > li:contains('アップロード数')",
"filters": ["query.text().replace(/,/g,'').match(/[\\d.]+ ?[ZEPTGMK]?i?B/)", " query ?(query[0]).sizeToNumber():null"]
},
"downloaded": {
"selector": "div:contains('Stats') + ul.stats > li:contains('Downloaded'), div:contains('統計情報') + ul.stats > li:contains('Downloaded')",
"filters": ["query.text().replace(/,/g,'').match(/Downloaded.+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"seeding": {
"selector": "div:contains('Community') + ul.stats > li:contains('Seeding:'), div:contains('コミュニティ') + ul.stats > li:contains('シード中')",
"filters": ["query.text().match(/[\\d.]+/)", " query ?query[0]:null"]
},
"bonus": {
"selector": ["div:contains('Stats') + ul.stats > li:contains('Bonus Points:')", "div:contains('統計情報') + ul.stats > li:contains('ボーナスポイント')"],
"filters": ["query.text().replace(/,/g,'')", "query.match(/Bonus Points.+?([\\d.]+)/)||query.match(/ボーナスポイント.+?([\\d.]+)/)", "(query && query.length>=2)?query[1]:null"]
},
"levelName": {
"selector": "div:contains('Personal') + ul.stats > li:contains('Class:'), div:contains('個人情報') + ul.stats > li:contains('階級:')",
"filters": ["query.text().match(/(Class:|階級:).+?(.+)/)", "(query && query.length>=2)?query[2]:''"]
},
"joinTime": {
"selector": ["div:contains('Stats') + ul.stats > li:contains('Joined:') > span, div:contains('統計情報') + ul.stats > li:contains('Joined:') > span"],
"filters": ["query.attr('title')||query.text()", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
},
"messageCount": {
"selector": ["#alerts > .alertbar > a[href='notice.php']", "div.alertbar > a[href*='inbox.php']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
},
"uploads": {
"selector": "div.box:eq(5) > div.head + ul.stats > li:eq(3)",
"filters": ["query.text().match(/[\\d.]+/)", " query ? query[0] : null"]
},
"downloads": {
"selector": "div.box:eq(5) > div.head + ul.stats > li:eq(7)",
"filters": ["query.text().match(/[\\d.]+/)", " query ? query[0] : null"]
}
}
},
"userSeedingTorrents": {
"page": "/torrents.php?type=seeding&userid=$user.id$",
"parser": "getUserSeedingTorrents.js",
"fields": {
"seedingSize": {
"selector": ["tr.torrent"],
"filters": ["jQuery.map(query.find('td:eq(5)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
}
}
},
"bonusExtendInfo": {
"page": "/bonus.php",
"fields": {
"bonusPerHour": {
"selector": ["h3:contains('Bonus Points') + div.box > strong:contains('/')","h3:contains('ボーナスポイント') + div.box > strong:contains('/')"],
"filters": ["parseFloat(query.text().split('/')[0])"]
}
}
}
},
"supportedFeatures": {
"imdbSearch": false
}
}
================================================
FILE: resource/sites/jpopsuki.eu/getSearchResult.js
================================================
if (!"".getQueryString) {
String.prototype.getQueryString = function(name, split) {
if (split == undefined) split = "&";
var reg = new RegExp(
"(^|" + split + "|\\?)" + name + "=([^" + split + "]*)(" + split + "|$)"
),
r;
if ((r = this.match(reg))) return decodeURI(r[2]);
return null;
};
}
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
if (/You will be banned for 6 hours after your login attempts run out/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
if (
/没有种子|No [Tt]orrents?|Your search did not match anything|用准确的关键字重试/.test(
options.responseText
)
) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let results = [];
let site = options.site;
// 获取种子列表行
let rows = options.page.find(options.resultSelector);
if (rows.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return results;
}
// 获取表头
let header = rows.eq(0).find("th,td");
// 用于定位每个字段所列的位置
let fieldIndex = {
time: -1,
size: -1,
seeders: -1,
leechers: -1,
completed: -1,
comments: -1,
author: -1,
category: 1
};
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
// 获取字段所在的列
for (let index = 0; index < header.length; index++) {
const cell = header.eq(index);
// 发布时间
if (cell.find("a[href*='order_by=s3']").length) {
fieldIndex.time = index;
continue;
}
// 大小
if (cell.find("a[href*='order_by=s4']").length) {
fieldIndex.size = index;
continue;
}
// 种子数
if (cell.find("a[href*='order_by=s6']").length) {
fieldIndex.seeders = index;
continue;
}
// 下载数
if (cell.find("a[href*='order_by=s7']").length) {
fieldIndex.leechers = index;
continue;
}
// 完成数
if (cell.find("a[href*='order_by=s5']").length) {
fieldIndex.completed = index;
continue;
}
}
try {
let albumRow = null;
let albumTitle = null;
// 遍历数据行
for (let index = 0; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let subTitle = "";
let title = row.find("a[href*='torrents.php?id=']").first();
if (title.length == 0) {
continue;
}
// 判断行类型
switch (true) {
// 专辑行
// 仅获取标题即可
case row.is(".group_redline"):
albumRow = row;
albumTitle = title;
continue;
// 专辑对应的不同格式行
case row.is(".group_torrent_redline"):
let tmpRow = row.clone().get(0);
// 补全前面的单元格,使后续的 fieldIndex 索引位置生效
tmpRow.insertCell(0);
tmpRow.insertCell(0);
tmpRow.insertCell(0);
cells = $(tmpRow).find(">td");
subTitle = title.text();
break;
// 单种行
case row.is(".torrent_redline"):
albumRow = row;
albumTitle = title;
break;
default:
continue;
}
let link = title.attr("href");
if (link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
// 获取下载链接
let url = row
.find("a[href*='torrents.php?action=download'][title='Download']")
.first();
if (url.length == 0) {
continue;
}
url = url.attr("href");
if (url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
title = albumTitle.parent();
title.find(">span, div.tags, a[title='View Comments']").remove();
let time =
fieldIndex.time == -1
? ""
: cells.eq(fieldIndex.time).attr("title") ||
cells.eq(fieldIndex.time).text() ||
"";
if (time) {
time += ":00";
}
let data = {
title: title
.text()
.trim()
.replace("()", ""),
link,
subTitle: subTitle,
url: url,
size: cells.eq(fieldIndex.size).html() || 0,
time: time,
author:
fieldIndex.author == -1
? ""
: cells.eq(fieldIndex.author).text() || "",
seeders:
fieldIndex.seeders == -1
? ""
: cells.eq(fieldIndex.seeders).text() || 0,
leechers:
fieldIndex.leechers == -1
? ""
: cells.eq(fieldIndex.leechers).text() || 0,
completed:
fieldIndex.completed == -1
? ""
: cells.eq(fieldIndex.completed).text() || 0,
comments:
fieldIndex.comments == -1
? ""
: cells.eq(fieldIndex.comments).text() || 0,
tags: Searcher.getRowTags(site, row),
site: site,
category:
fieldIndex.category == -1
? null
: this.getCategory(albumRow.find(">td").eq(fieldIndex.category))
};
results.push(data);
}
} catch (error) {
console.error(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.message}`;
}
return results;
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: "",
link: ""
};
if (!cell) {
return result;
}
let link = cell.find("a:first");
let img = link.find("img:first");
result.link = link.attr("href");
if (result.link.substr(0, 4) !== "http") {
result.link = options.site.url + result.link;
}
if (img.length) {
result.name = img.attr("title");
} else {
result.name = link.text();
}
return result;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/sites/jpopsuki.eu/getUserSeedingTorrents.js
================================================
if ("".getQueryString === undefined) {
String.prototype.getQueryString = function(name, split) {
if (split == undefined) split = "&";
var reg = new RegExp(
"(^|" + split + "|\\?)" + name + "=([^" + split + "]*)(" + split + "|$)"
),
r;
if ((r = this.match(reg))) return decodeURI(r[2]);
return null;
};
}
(function(options, User) {
class Parser {
constructor(options, dataURL) {
this.options = options;
this.dataURL = dataURL;
this.body = null;
this.rawData = "";
this.pageInfo = {
count: 0,
current: 1
};
this.result = {
seedingSize: 0,
};
this.load();
}
/**
* 完成
*/
done() {
this.options.resolve(this.result);
}
/**
* 解析内容
*/
parse() {
const doc = new DOMParser().parseFromString(this.rawData, "text/html");
// 构造 jQuery 对象
this.body = $(doc).find("body");
this.getPageInfo();
let results = new User.InfoParser(User.service).getResult(
this.body,
this.options.rule
);
if (results) {
this.result.seedingSize += results.seedingSize;
}
// 是否已到最后一页
if (this.pageInfo.current < this.pageInfo.count) {
this.pageInfo.current++;
this.load();
} else {
this.done();
}
}
/**
* 获取页面相关内容
*/
getPageInfo() {
if (this.pageInfo.count > 0) {
return;
}
// 获取最大页码
const infos = this.body
.find("a[href*='torrents.php?page=']:contains('Last'):last")
.attr("href");
if (infos) {
this.pageInfo.count = parseInt(infos.getQueryString("page"));
} else {
this.pageInfo.count = 2;
}
}
/**
* 加载当前页内容
*/
load() {
let url = this.dataURL;
if (this.pageInfo.current > 1) {
url += "&page=" + this.pageInfo.current;
}
$.get(url)
.done(result => {
this.rawData = result;
this.parse();
})
.fail(() => {
this.done();
});
}
}
let dataURL = options.site.activeURL + options.rule.page;
dataURL = dataURL
.replace("$user.id$", options.userInfo.id)
.replace("$user.name$", options.userInfo.name)
.replace("://", "****")
.replace(/\/\//g, "/")
.replace("****", "://");
new Parser(options, dataURL);
})(_options, _self);
/**
*
_options 表示当前参数
{
site,
rule,
userInfo,
resolve,
reject
}
_self 表示 User(/src/background/user.ts) 类实例
*/
================================================
FILE: resource/sites/jpopsuki.eu/torrents.js
================================================
(function($) {
console.log("this is torrent.js");
class App extends window.NexusPHPCommon {
init() {
// super();
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $("tr:not(.filter_hide) > td > span > a[title='Download']").toArray();
if (links.length == 0) {
// 排除使用免费令牌的链接
links = $(
"a[href*='torrents.php?action=download']:not([href*='usetoken'])"
).toArray();
}
if (links.length == 0) {
return this.t("getDownloadURLsFailed"); //"获取下载链接失败,未能正确定位到链接";
}
let urls = $.map(links, item => {
let link = $(item).attr("href");
return this.getFullURL(link);
});
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("#torrent_table, .torrent_table tr.basic-movie-list__torrent-row").find(
"td:contains('MB'),td:contains('GB'),td:contains('TB'),td:contains('MiB'),td:contains('GiB'),td:contains('TiB')"
)
);
}
/**
* 下载拖放的种子
* @param {*} url
* @param {*} callback
*/
downloadFromDroper(data, callback) {
if (typeof data === "string") {
data = {
url: data,
title: ""
};
}
console.log(data);
if (!data.url) {
PTService.showNotice({
msg: this.t("invalidURL") //"无效的链接"
});
callback();
return;
}
let authkey = data.url.getQueryString("authkey");
let torrent_pass = data.url.getQueryString("torrent_pass");
// authkey=&torrent_pass
if (!authkey && !torrent_pass) {
PTService.showNotice({
msg: this.t("dropInvalidURL") //"无效的链接,请拖放下载链接"
});
callback();
return;
}
data.url = this.getFullURL(data.url);
this.sendTorrentToDefaultClient(data)
.then(result => {
callback(result);
})
.catch(result => {
callback(result);
});
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/jptv.club/config.json
================================================
{
"name": "JPTV",
"timezoneOffset": "+0800",
"schema": "UNIT3D",
"url": "https://jptv.club/",
"description": "JPTV",
"tags": [
"影视",
"剧集",
"动漫"
],
"host": "jptv.club",
"levelRequirements": [{
"level": "1",
"name": "PowerUser",
"interval": "1",
"uploaded": "1TB",
"privilege": "Invite forums"
},{
"level": "2",
"name": "SuperUser",
"interval": "2",
"uploaded": "5TB",
"privilege": ""
},{
"level": "3",
"name": "ExtremeUser",
"interval": "3",
"uploaded": "20TB",
"privilege": "Prune Immunity"
},{
"level": "4",
"name": "InsaneUser",
"interval": "6",
"uploaded": "50TB",
"privilege": ""
},{
"level": "5",
"name": "Veteran",
"interval": "12",
"uploaded": "15TB",
"privilege": "Special FL"
}],
"collaborator": "MewX",
"searchEntryConfig": {
"page": "/torrents/filter",
"resultType": "html",
"parseScriptFile": "/sites/asiancinema.me/getSearchResult.js",
"resultSelector": "div.table-responsive > table:first",
"queryString": "search=$key$",
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"queryString": "imdb=$key$",
"replaceKey": [
"tt", ""
]
}]
}
}
================================================
FILE: resource/sites/jptv.club/getSearchResult.js
================================================
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
if (/\/login/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let site = options.site;
site.searchEntryConfig = options.entry
let selector =
options.resultSelector || "div.table-responsive > table:first";
let table = options.page.find(selector);
// 获取种子列表行
let rows = table.find("> tbody > tr");
if (rows.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return [];
}
let results = [];
// 获取表头
let header = table.find("> thead > tr > th");
let beginRowIndex = 0;
if (header.length == 0) {
beginRowIndex = 1;
header = rows.eq(0).find("th,td");
}
// 用于定位每个字段所列的位置
let fieldIndex = {
// 发布时间
time: -1,
// 大小
size: -1,
// 上传数量
seeders: -1,
// 下载数量
leechers: -1,
// 完成数量
completed: -1,
// 评论数量
comments: -1,
// 发布人
author: header.length - 1,
// 分类
category: 1
};
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
// 获取字段所在的列
for (let index = 0; index < header.length; index++) {
let cell = header.eq(index);
let text = cell.text();
// 评论数
if (cell.find("a[href*='comments']").length) {
fieldIndex.comments = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 发布时间
if (
cell.find("a[href*='created_at']").length ||
cell.find("i.fa-clock").length
) {
fieldIndex.time = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 大小
if (
cell.find("a[href*='size']").length ||
cell.find("i.fa-file").length
) {
fieldIndex.size = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 种子数
if (
cell.find("a[href*='seed']").length ||
cell.find("i.fa-arrow-circle-up").length
) {
fieldIndex.seeders = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 下载数
if (
cell.find("a[href*='leech']").length ||
cell.find("i.fa-arrow-circle-down").length
) {
fieldIndex.leechers = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 完成数
if (
cell.find("a[href*='complete']").length ||
cell.find("i.fa-check-square").length
) {
fieldIndex.completed = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 分类
if (cell.is(".torrents-icon")) {
fieldIndex.category = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
}
try {
// 遍历数据行
for (let index = beginRowIndex; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = row.find("a.view-torrent");
if (title.length == 0) {
continue;
}
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
// 获取下载链接
let url = "";
let downloadURL = row.find("a[href*='/download/']");
if (downloadURL.length == 0) {
downloadURL = row.find("a[href*='/download_check/']");
if (downloadURL.length > 0) {
url = downloadURL
.attr("href")
.replace("/download_check/", "/download/");
}
} else {
url = downloadURL.attr("href");
}
if (url.length == 0) {
continue;
}
if (url && url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
let data = {
title: title.text(),
subTitle: this.getSubTitle(title, row),
link,
url: url,
size:
cells
.eq(fieldIndex.size)
.text()
.trim() || 0,
time:
fieldIndex.time == -1
? ""
: cells
.eq(fieldIndex.time)
.find("span[title]")
.attr("title") ||
cells.eq(fieldIndex.time).text().replace('秒前', ' seconds ago').replace('秒前', ' seconds ago').replace('分钟前', ' minutes ago').replace('分鐘前', ' minutes ago').replace('天前', ' day ago').replace('小時前', ' hours ago').replace('小时前', ' hours ago').replace('周前', ' weeks ago').replace('个月前', ' months ago').replace('年前', ' years ago').replace('年', ' years ago')||
"",
author:
fieldIndex.author == -1
? ""
: cells.eq(fieldIndex.author).text() || "",
seeders:
fieldIndex.seeders == -1
? ""
: cells.eq(fieldIndex.seeders).text() || 0,
leechers:
fieldIndex.leechers == -1
? ""
: cells.eq(fieldIndex.leechers).text() || 0,
completed:
fieldIndex.completed == -1
? ""
: cells.eq(fieldIndex.completed).text() || 0,
comments:
fieldIndex.comments == -1
? ""
: cells.eq(fieldIndex.comments).text() || 0,
site: site,
tags: Searcher.getRowTags(site, row),
entryName: options.entry.name,
category:
fieldIndex.category == -1
? null
: this.getCategory(cells.eq(fieldIndex.category)),
progress: this.getFieldValue(row, cells, fieldIndex, "progress"),
status: this.getFieldValue(row, cells, fieldIndex, "status")
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; // `[${options.site.name}]没有搜索到相关的种子`;
}
} catch (error) {
console.log(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.stack}`;
}
return results;
}
/**
* 获取标签
* @param {*} row
* @param {*} selectors
* @return array
*/
getTags(row, selectors) {
let tags = [];
if (selectors && selectors.length > 0) {
selectors.forEach(item => {
if (item.selector) {
let result = row.find(item.selector);
if (result.length) {
tags.push({
name: item.name,
color: item.color
});
}
}
});
}
return tags;
}
/**
* 获取副标题
* @param {*} title
* @param {*} row
*/
getSubTitle(title, row) {
return "";
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: cell.find("i:first").attr("data-original-title"),
link: cell.find("a:first").attr("href")
};
if (result.name) {
result.name = result.name.replace(" torrent", "");
}
return result;
}
getFieldValue(row, cells, fieldIndex, fieldName, returnCell) {
let parent = row;
let cell = null;
if (
cells &&
fieldIndex &&
fieldIndex[fieldName] !== undefined &&
fieldIndex[fieldName] !== -1
) {
cell = cells.eq(fieldIndex[fieldName]);
parent = cell || row;
}
let result = Searcher.getFieldValue(site, parent, fieldName);
if (!result && cell) {
if (returnCell) {
return cell;
}
result = cell.text();
}
return result;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/sites/jptvts.us/config.json
================================================
{
"name": "jptvts.us",
"timezoneOffset": "+0000",
"description": "JPTVTS",
"icon": "https://jptvts.us/themes/default/images/favicon.ico",
"url": "https://jptvts.us/",
"tags": ["日剧", "综艺"],
"schema": "Common",
"plugins": [
{
"name": "种子详情页面",
"pages": ["/torrents-details.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/details.js"]
},
{
"name": "种子列表",
"pages": ["/torrents-today.php", "/torrents-search.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/torrents.js"]
}
],
"host": "jptvts.us",
"searchEntryConfig": {
"page": "/get_ttable.php?pcat=Show+All&subbed=&fl=&resd=&p=0&searchstr=$key$&deadlive=1&sortcol=id&sortorder=desc&startdt=&enddt=",
"loggedRegex": "class=\"ttable_headinner\"",
"resultType": "html",
"resultSelector": "table",
"fieldIndex": {
"category": 0,
"title": 1,
"link": 1,
"url": 2,
"comments": 5,
"time": 10,
"size": 6,
"author": 4,
"seeders": 7,
"leechers": 8,
"completed": 9
},
"fieldSelector": {
"title": {
"selector": ["a"],
"filters": ["query.text()"]
},
"link": {
"selector": ["a"],
"filters": ["query.attr('href')", "'https://jptvts.us/'+query"]
},
"url": {
"selector": [""],
"filters": [
"query.children().attr('href')",
"'https://jptvts.us/'+query"
]
},
"time": {
"selector": [""],
"filters": ["'20'+query.text()"]
},
"progress": {
"selector": [
"td.ttable_seeding font[color='green'], td.ttable_seeding font[color='black']",
"td.ttable_seeding font[color='#ff0000']",
""
],
"switchFilters": [
["query.length > 0 ? 100:null"],
["query.length > 0 ? 0:null"],
["null"]
]
},
"status": {
"selector": [
"td.ttable_seeding font[color='green']",
"td.ttable_seeding font[color='black']",
"td.ttable_seeding font[color='#ff0000']"
],
"switchFilters": [["2"], ["255"], ["1"]]
}
}
},
"searchEntry": [
{
"name": "全部",
"enabled": true
}
],
"torrentTagSelectors": [
{
"name": "Free",
"selector": "img[src='images/freeleech.png']"
}
],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"name": {
"selector": "#main > table .myBlock-caption:first"
},
"isLogged": {
"selector": ["a[href*='account-logout.php']"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["a[href*='/forum/private.php']"],
"filters": [
"query.text().match(/(\\d+)/)",
"(query && query.length>=2)?parseInt(query[1]):0"
]
},
"uploaded": {
"selector": [".myBlock-content td:contains('Uploaded:') + td"],
"filters": [
"query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():null"
]
},
"downloaded": {
"selector": [".myBlock-content td:contains('Downloaded:') + td"],
"filters": [
"query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():null"
]
},
"ratio": {
"selector": [".myBlock-content td:contains('Ratio:') + td"],
"filters": ["query.text()"]
},
"levelName": {
"selector": [".myBlock-content td:contains('Class:') + td"],
"filters": ["query.text()"]
},
"bonus": {
"value": "N/A"
}
}
},
"userExtendInfo": {
"page": "/account.php",
"fields": {
"joinTime": {
"selector": ["td.prof-lbl:contains('Joined:') + td"],
"filters": ["dateTime(query.text()).valueOf()"]
},
"seeding": {
"selector": ["b:contains('Currently seeding')"],
"filters": [
"query.text().match(/(\\d+)/)",
"(query && query.length>=2)?parseInt(query[1]):null"
]
},
"seedingSize": {
"selector": [
"b:contains('Currently seeding') + br + table tr:not(:first-child) > td:nth-child(4)"
],
"filters": [
"jQuery.map(query, (item)=>{return $(item).text();})",
"_self.getTotalSize(query)"
]
}
}
},
"common": {
"page": "/torrents-details.php",
"fields": {
"downloadURL": {
"selector": ["a[href*='download.php?id=']"],
"filters": ["query.attr('href')"]
},
"size": {
"selector": ["td[align='left']:contains('Total Size:') + td"],
"filters": [
"query.parent().text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>1)?(query[1]).sizeToNumber():0"
]
},
"sayThanksButton": {
"selector": ["#ty-button"],
"filters": ["query"]
},
"downloadURLs": {
"selector": ["a[href*='download.php?id=']"],
"filters": ["query.toArray()"]
},
"confirmSize": {
"selector": ["table.ttable_headinner"],
"filters": ["query.find('td.ttable_size')"]
}
}
}
}
}
================================================
FILE: resource/sites/kamept.com/config.json
================================================
{
"name": "kamept ",
"timezoneOffset": "+0800",
"description": "kamept",
"url": "https://kamept.com/",
"icon": "https://kamept.com/favicon.ico",
"tags": [],
"schema": "NexusPHP",
"host": "kamept.com",
"collaborator": [
"koal",
"amorphobia",
"IITII"
],
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"seedingPoints": "40000",
"privilege": "可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以进入论坛的“PT交流区”板块;可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"seedingPoints": "80000",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"seedingPoints": "150000"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"seedingPoints": "250000",
"privilege": "可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"seedingPoints": "400000",
"privilege": "得到两个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"seedingPoints": "600000",
"privilege": "得到两个邀请名额;可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"seedingPoints": "800000",
"privilege": "得到五个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"seedingPoints": "1000000",
"privilege": "得到十个邀请名额。"
}
],
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/karagarga.in/browse.js
================================================
(function($) {
console.log("this is browse.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $(
"table#browse:last a[href*='down.php']"
).toArray();
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (links.length == 0) {
// "获取下载链接失败,未能正确定位到链接";
return this.t("getDownloadURLsFailed");
}
let urls = $.map(links, item => {
let link = $(item).attr("href");
if (link && link.substr(0, 4) != "http") {
link = siteURL + link;
}
return link;
});
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("table#browse:last").find(
"td:contains('MB'),td:contains('GB'),td:contains('TB')"
)
);
}
/**
* 获取有效的拖放地址
* @param {*} url
*/
getDroperURL(url) {
if (url.indexOf("down.php") === -1) {
return "";
}
return url;
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/karagarga.in/config.json
================================================
{
"name": "KaraGarga",
"timezoneOffset": "+0000",
"description": "KG",
"url": "https://karagarga.in/",
"icon": "https://karagarga.in/favicon.ico",
"tags": ["影视", "音乐", "文学"],
"schema": "karagarga",
"host": "karagarga.in",
"collaborator": "luckiestone",
"plugins": [{
"name": "种子详情页面",
"pages": ["/details.php"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["/browse.php"],
"scripts": ["/schemas/NexusPHP/common.js", "browse.js"]
}],
"levelRequirements": [
{
"level": "1",
"name": "Power User",
"interval": "13",
"uploaded": "50GB",
"ratio": "1.05"
}
],
"searchEntryConfig": {
"page": "/browse.php",
"queryString": "search=$key$&search_type=torrent",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "table[id='browse']:last > tbody > tr",
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"replaceKey": ["tt", ""],
"queryString": "search_type=imdb&search=$key$"
}]
},
"searchEntry": [{
"name": "All",
"enabled": true
}],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"id": {
"selector": "a[title='click to see your details page']:last",
"attribute": "href",
"filters": ["query ? query.getQueryString('id'):''"]
},
"name": {
"selector": "a[title='click to see your details page']:last"
},
"isLogged": {
"selector": ["a[href*='logout.php']"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["td[style*='background: #DF0101'] a[href*='messages.php']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
},
"bonus": {
"value": "N/A"
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": ["td.rowhead:contains('Uploaded') + td"],
"filters": ["query.text().replace(/,|\\r|\\n|\\s/g,'').match(/.*?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
},
"downloaded": {
"selector": ["td.rowhead:contains('Downloaded') + td"],
"filters": ["query.text().replace(/,|\\r|\\n|\\s/g,'').match(/.*?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
},
"ratio": {
"selector": "td.rowhead:contains('Share ratio') + td > table > tbody > tr > td:nth-child(1) > font",
"filters": ["parseFloat(query.text())"]
},
"levelName": {
"selector": ["td.rowhead:contains('Class') + td"]
},
"joinTime": {
"selector": ["td.rowhead:contains('Join'):contains('date') + td"],
"filters": ["query.text().split(' (')[0]", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
}
}
},
"userSeedingTorrents": {
"page": "/current.php?id=$user.id$",
"fields": {
"seeding": {
"selector": ["table[id='browse'] > tbody > tr[style*='padding-top:0px']"],
"filters": ["query.length"]
},
"seedingSize": {
"selector": ["table[id='browse'] > tbody > tr[style*='padding-top:0px']"],
"filters": ["jQuery.map(query.find('td:eq(9)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
}
}
}
}
}
================================================
FILE: resource/sites/karagarga.in/details.js
================================================
(function($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.showTorrentSize();
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
let query = $("a.index[href*='down.php']");
let url = "";
if (query.length > 0) {
url = query.attr("href");
}
if (!url) {
return "";
}
return `${location.origin}${url}`;
}
showTorrentSize() {
let query = $("td.heading:contains('Size') + td");
let size = "";
if (query.length > 0) {
size = query.text().match(/^[^\(]+/);
// attachment
PTService.addButton({
title: "当前种子大小",
icon: "attachment",
label: size
});
}
}
/**
* 获取当前种子标题
*/
getTitle() {
return $("table.main h1:first")
.text()
.trim();
}
}
new App().init();
})(jQuery, window);
================================================
FILE: resource/sites/karagarga.in/getSearchResult.js
================================================
(function(options) {
class Parser {
constructor() {
this.haveData = false;
if (/takelogin\.php/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
if (
/没有种子|No [Tt]orrents?|Your search did not match anything|用准确的关键字重试/.test(
options.responseText
)
) {
options.status = ESearchResultParseStatus.noTorrents;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let results = [];
let site = options.site;
// 获取种子列表行
let rows = options.page.find(
options.resultSelector || "table[id='browse'] > tbody > tr[style*='padding-top:0px']"
);
let time_regex = /([A-Za-z]{3})\s(\d+)\s'(\d{2})/;
// 用于定位每个字段所列的位置
let fieldIndex = {
//title
title: 1,
//downloadlink
downloadlink: 1,
// 时间
time: 8,
// 大小
size: 10,
// 上传人数
seeders: 12,
// 下载人数
leechers: 13,
// 完成人数
completed: 11,
// 评论人数
comments: 6,
// 发布人
author: 7,
category: 0
};
if (site.url.substr(-1) == "/") {
site.url = site.url.substr(0, site.url.length - 1);
}
// 遍历数据行
for (let index = 1; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = cells.eq(fieldIndex.title).find("a[href*='details.php?id=']").first();
if (title.length == 0) {
continue;
}
let titleStrings = title.text();
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}/${link}`;
}
let url = "";
url = cells.eq(fieldIndex.downloadlink).find("a[href*='/down.php/']").first().attr("href");
if (url && url.substr(0, 4) !== "http") {
url = `${site.url}/${url}`;
}
if (!url) {
continue;
}
let time = cells.eq(fieldIndex.time).text().match(time_regex)[1];
if(RegExp.$1 == "Jan") {
time = "20"+RegExp.$3+"-01-"+RegExp.$2+" 00:00";
}
if(RegExp.$1 == "Feb") {
time = "20"+RegExp.$3+"-02-"+RegExp.$2+" 00:00";
}
if(RegExp.$1 == "Mar") {
time = "20"+RegExp.$3+"-03-"+RegExp.$2+" 00:00";
}
if(RegExp.$1 == "Apr") {
time = "20"+RegExp.$3+"-04-"+RegExp.$2+" 00:00";
}
if(RegExp.$1 == "May") {
time = "20"+RegExp.$3+"-05-"+RegExp.$2+" 00:00";
}
if(RegExp.$1 == "Jun") {
time = "20"+RegExp.$3+"-06-"+RegExp.$2+" 00:00";
}
if(RegExp.$1 == "Jul") {
time = "20"+RegExp.$3+"-07-"+RegExp.$2+" 00:00";
}
if(RegExp.$1 == "Aug") {
time = "20"+RegExp.$3+"-08-"+RegExp.$2+" 00:00";
}
if(RegExp.$1 == "Sep") {
time = "20"+RegExp.$3+"-09-"+RegExp.$2+" 00:00";
}
if(RegExp.$1 == "Oct") {
time = "20"+RegExp.$3+"-10-"+RegExp.$2+" 00:00";
}
if(RegExp.$1 == "Nov") {
time = "20"+RegExp.$3+"-11-"+RegExp.$2+" 00:00";
}
if(RegExp.$1 == "Dec") {
time = "20"+RegExp.$3+"-12-"+RegExp.$2+" 00:00";
}
let data = {
title: titleStrings,
link: link,
url: url,
size: cells.eq(fieldIndex.size).text() || 0,
time: time,
author: cells.eq(fieldIndex.author).text() || "",
seeders:
cells
.eq(fieldIndex.seeders)
.text(),
leechers:
cells
.eq(fieldIndex.leechers)
.text(),
completed: cells.eq(fieldIndex.completed).text().match(/(\d+)/)[0] || 0,
comments: cells.eq(fieldIndex.comments).find("a[href*='#startcomments']").text() || 0,
site: site,
entryName: options.entry.name,
category: this.getCategory(cells.eq(fieldIndex.category)),
tags: this.getTags(row, options.torrentTagSelectors)
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
}
return results;
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: "",
link: ""
};
let link = cell.find("a:first");
let img = link.find("img:first");
result.link = link.attr("href");
if (result.link.substr(0, 4) !== "http") {
result.link = options.site.url + result.link;
}
result.name = img.attr("title").match(/[^::]+/)[0];
return result;
}
/**
* 获取标签
* @param {*} row
* @param {*} selectors
* @return array
*/
getTags(row, selectors) {
let tags = [];
if (selectors && selectors.length > 0) {
// 使用 some 避免错误的背景类名返回多个标签
selectors.some(item => {
if (item.selector) {
let result = row.find(item.selector);
if (result.length) {
tags.push({
name: item.name,
color: item.color
});
return true;
}
}
});
}
return tags;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options);
================================================
FILE: resource/sites/kp.m-team.cc/config.json
================================================
{
"name": "M-Team",
"timezoneOffset": "+0800",
"description": "M-Team",
"url": "https://kp.m-team.cc/",
"icon": "https://kp.m-team.cc/favicon.ico",
"tags": ["影视", "综合","Adult"],
"schema": "NexusPHP",
"host": "kp.m-team.cc",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "200GB",
"ratio": "2",
"privilege": "魔力值加成:+1%;可以使用匿名發表候選種子;可以上傳字幕"
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "400GB",
"ratio": "3",
"privilege": "魔力值加成:+2%;可以發送邀請;可以管理自己上傳的字幕;可以檢視別人的下載紀錄(當對方的隱私權設定不為強才會生效);可以使用個性條"
},{
"level": "3",
"name": "Crazy User",
"interval": "12",
"downloaded": "500GB",
"ratio": "4",
"privilege": "魔力值加成:+3%"
},{
"level": "4",
"name": "Insane User",
"interval": "16",
"downloaded": "800GB",
"ratio": "5",
"privilege": "魔力值加成:+4%;可以檢視排行榜"
},{
"level": "5",
"name": "Veteran User",
"interval": "20",
"downloaded": "1000GB",
"ratio": "6",
"privilege": "魔力值加成:+5%"
},{
"level": "6",
"name": "Extreme User",
"interval": "24",
"downloaded": "2000GB",
"ratio": "7",
"privilege": "魔力值加成:+6%"
},{
"level": "7",
"name": "Ultimate User",
"interval": "28",
"downloaded": "2500GB",
"ratio": "8",
"privilege": "魔力值加成:+7%"
},{
"level": "8",
"name": "Nexus Master",
"interval": "32",
"downloaded": "3000GB",
"ratio": "9",
"privilege": "魔力值加成:+8%"
}],
"formerHosts": [
"pt.m-team.cc",
"tp.m-team.cc"
],
"plugins": [{
"name": "种子列表",
"pages": ["/adult.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/NexusPHP/torrents.js"]
}, {
"name": "种子列表封面模式",
"pages": ["/torrents.php", "/movie.php", "/music.php", "/adult.php"],
"scripts": ["/libs/album/album.js", "torrents.js"],
"styles": ["/libs/album/style.css"]
}],
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["> td:eq(8)"],
"filters": ["query.text()==='--'?null:parseFloat(query.text())"]
},
"status": {
"selector": ["> td:eq(8)"],
"filters": ["query.text()==='--'?null:query.is('.peer-active')?(parseFloat(query.text())==100?2:1):(parseFloat(query.text())==100?255:3)"]
}
}
},
"searchEntry": [{
"name": "综合",
"enabled": true
}, {
"entry": "/movie.php?search=$key$¬newword=1",
"name": "电影",
"enabled": false
}, {
"entry": "/music.php?search=$key$¬newword=1",
"name": "音乐",
"enabled": true
}, {
"entry": "/adult.php?search=$key$¬newword=1",
"name": "adult",
"enabled": true
}],
"categories": [{
"entry": "torrents.php",
"result": "&cat$id$=1",
"category": [{
"id": 401,
"name": "Movie(電影)/SD"
}, {
"id": 419,
"name": "Movie(電影)/HD"
}, {
"id": 420,
"name": "Movie(電影)/DVDiSo"
}, {
"id": 421,
"name": "Movie(電影)/Blu-Ray"
}, {
"id": 439,
"name": "Movie(電影)/Remux"
}, {
"id": 403,
"name": "TV Series(影劇/綜藝)/SD"
}, {
"id": 402,
"name": "TV Series(影劇/綜藝)/HD"
}, {
"id": 435,
"name": "TV Series(影劇/綜藝)/DVDiSo"
}, {
"id": 438,
"name": "TV Series(影劇/綜藝)/BD"
}, {
"id": 404,
"name": "紀錄教育"
}, {
"id": 405,
"name": "Anime(動畫)"
}, {
"id": 407,
"name": "Sports(運動)"
}, {
"id": 422,
"name": "Software(軟體)"
}, {
"id": 423,
"name": "PCGame(PC遊戲)"
}, {
"id": 427,
"name": "eBook(電子書)"
}, {
"id": 409,
"name": "Misc(其他)"
}]
}, {
"entry": "movie.php",
"result": "&cat$id$=1",
"category": [{
"id": 401,
"name": "Movie(電影)/SD"
}, {
"id": 419,
"name": "Movie(電影)/HD"
}, {
"id": 420,
"name": "Movie(電影)/DVDiSo"
}, {
"id": 421,
"name": "Movie(電影)/Blu-Ray"
}, {
"id": 439,
"name": "Movie(電影)/Remux"
}, {
"id": 404,
"name": "紀錄教育"
}]
}, {
"entry": "music.php",
"result": "&cat$id$=1",
"category": [{
"id": 406,
"name": "MV(演唱)"
}, {
"id": 408,
"name": "Music(AAC/ALAC)"
}, {
"id": 434,
"name": "Music(無損)"
}]
}, {
"entry": "adult.php",
"result": "&cat$id$=1",
"category": [{
"id": 410,
"name": "AV(有碼)/HD Censored"
}, {
"id": 429,
"name": "AV(無碼)/HD Uncensored"
}, {
"id": 424,
"name": "AV(有碼)/SD Censored"
}, {
"id": 430,
"name": "AV(無碼)/SD Uncensored"
}, {
"id": 426,
"name": "AV(無碼)/DVDiSo Uncensored"
}, {
"id": 437,
"name": "AV(有碼)/DVDiSo Censored"
}, {
"id": 431,
"name": "AV(有碼)/Blu-Ray Censored"
}, {
"id": 432,
"name": "AV(無碼)/Blu-Ray Uncensored"
}, {
"id": 436,
"name": "AV(網站)/0Day"
}, {
"id": 425,
"name": "IV(寫真影集)/Video Collection"
}, {
"id": 433,
"name": "IV(寫真圖集)/Picture Collection"
}, {
"id": 411,
"name": "H-Game(遊戲)"
}, {
"id": 412,
"name": "H-Anime(動畫)"
}, {
"id": 413,
"name": "H-Comic(漫畫)"
}]
}],
"selectors": {
"userExtendInfo": {
"merge": true,
"fields": {
"uploaded": {
"selector": ["td.rowfollow:contains('分享率')", "td.rowhead:contains('传输') + td", "td.rowhead:contains('傳送') + td", "td.rowhead:contains('Transfers') + td"],
"filters": ["query.text().replace(/,/g,'').match(/(?:上[传傳]量|Uploaded).+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
},
"downloaded": {
"selector": ["td.rowfollow:contains('分享率')", "td.rowhead:contains('传输') + td", "td.rowhead:contains('傳送') + td", "td.rowhead:contains('Transfers') + td"],
"filters": ["query.text().replace(/,/g,'').match(/(?:下[载載]量|Downloaded).+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
}
}
},
"userSeedingTorrents": {
"page": "/getusertorrentlist.php?userid=$user.id$&type=seeding",
"parser": "getUserSeedingTorrents.js",
"fields": {
"seeding": {
"selector": ["tr:not(:eq(0))"],
"filters": ["query.find('td.rowfollow:eq(2)').length"]
},
"seedingSize": {
"selector": ["tr:not(:eq(0))"],
"filters": ["jQuery.map(query.find('td.rowfollow:eq(2)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
}
}
},
"bonusExtendInfo": {
"prerequisites": "!user.bonusPerHour",
"page": "/mybonus.php",
"fields": {
"bonusPerHour": {
"selector": ["td:contains('您目前每小時合計可獲得'):last",
"td:contains('您目前每小时合计可获得'):last",
"td:contains('目前將會獲取'):last",
"td:contains('目前将会获取'):last"],
"filters": ["parseFloat(query.text().match(/[獲获][得取](\\d+(?:\\.\\d+)?)/)[1])"]
}
}
}
}
}
================================================
FILE: resource/sites/kp.m-team.cc/getUserSeedingTorrents.js
================================================
if ("".getQueryString === undefined) {
String.prototype.getQueryString = function(name, split) {
if (split == undefined) split = "&";
var reg = new RegExp(
"(^|" + split + "|\\?)" + name + "=([^" + split + "]*)(" + split + "|$)"
),
r;
if ((r = this.match(reg))) return decodeURI(r[2]);
return null;
};
}
(function(options, User) {
class Parser {
constructor(options, dataURL) {
this.options = options;
this.dataURL = dataURL;
this.body = null;
this.rawData = "";
this.pageInfo = {
count: 0,
current: 0
};
this.result = {
seeding: 0,
seedingSize: 0
};
this.load();
}
/**
* 完成
*/
done() {
this.options.resolve(this.result);
}
/**
* 解析内容
*/
parse() {
const doc = new DOMParser().parseFromString(this.rawData, "text/html");
// 构造 jQuery 对象
this.body = $(doc).find("body");
this.getPageInfo();
let results = new User.InfoParser(User.service).getResult(
this.body,
this.options.rule
);
if (results) {
this.result.seeding += results.seeding;
this.result.seedingSize += results.seedingSize;
}
// 是否已到最后一页
if (this.pageInfo.current < this.pageInfo.count) {
this.pageInfo.current++;
this.load();
} else {
this.done();
}
}
/**
* 获取页面相关内容
*/
getPageInfo() {
if (this.pageInfo.count > 0) {
return;
}
// 获取最大页码
const infos = this.body
.find("a[href*='type=seeding']:contains('1'):last")
.attr("href");
if (infos) {
this.pageInfo.count = parseInt(infos.getQueryString("page"));
} else {
this.pageInfo.count = 1;
}
}
/**
* 加载当前页内容
*/
load() {
let url = this.dataURL;
if (this.pageInfo.current > 0) {
url += "&page=" + this.pageInfo.current;
}
$.get(url)
.done(result => {
this.rawData = result;
this.parse();
})
.fail(() => {
this.done();
});
}
}
let dataURL = options.site.activeURL + options.rule.page;
dataURL = dataURL
.replace("$user.id$", options.userInfo.id)
.replace("$user.name$", options.userInfo.name)
.replace("://", "****")
.replace(/\/\//g, "/")
.replace("****", "://");
new Parser(options, dataURL);
})(_options, _self);
/**
*
_options 表示当前参数
{
site,
rule,
userInfo,
resolve,
reject
}
_self 表示 User(/src/background/user.ts) 类实例
*/
================================================
FILE: resource/sites/kp.m-team.cc/torrents.js
================================================
(function($, window) {
// 添加封面模式
PTService.addButton({
title: PTService.i18n.t("buttons.coverTip"), //"以封面的方式进行查看",
icon: "photo",
label: PTService.i18n.t("buttons.cover"), //"封面模式",
click: (success, error) => {
// 获取目标表格
let tables = $("table.torrentname");
let images = [];
tables.each((index, item) => {
let img = $("img[onmouseover]", item);
let url = img.attr("src");
let href = img.parent().attr("href");
let title = $("td.embedded", item).text();
images.push({
url: url,
key: href,
title: title, //img.parent().attr("title"),
link: img.parent().attr("href")
});
});
// 创建预览
new album({
images: images,
onClose: () => {
PTService.buttonBar.show();
}
});
success();
PTService.buttonBar.hide();
}
});
})(jQuery, window);
================================================
FILE: resource/sites/learnflakes.net/config.json
================================================
{
"name": "Learn Flakes",
"timezoneOffset": "+0000",
"url": "https://learnflakes.net/",
"description": "Learnflakes is a private torrent tracker, opened in 2013, which specializes in educational materials on computer and Internet topics",
"icon": "https://learnflakes.net/favicon.ico",
"tags": ["学习"],
"schema": "Common",
"collaborator": [
"fzlins"
],
"host": "learnflakes.net",
"searchEntryConfig": {
"page": "/",
"queryString": "p=torrents&pid=10&keywords=$key$&search_type=name",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "div#plugins > div#content",
"dataRowSelector": " > div.torrent-box[id^='torrent_']",
"fieldSelector": {
"title": {
"selector": [ "strong.newIndicator > a" ]
},
"link": {
"selector": [ "strong.newIndicator > a" ],
"attribute": "href"
},
"url": {
"selector": [ "div.torrentImages a" ],
"attribute": "href"
},
"time": {
"selector": [ ".torrentOwner" ],
"filters": ["query.text().substring(9,25)", "dateTime(query, 'DD-MM-YYYY HH:mm').isValid() ? dateTime(query, 'DD-MM-YYYY HH:mm').format('YYYY-MM-DD HH:mm') : query"]
},
"size": {
"selector": [ "a[rel='torrent_size']" ],
"filters": ["query ? query.text().trim().sizeToNumber() : 0"]
},
"seeders": {
"selector": [ "a[rel='torrent_seeders']" ]
},
"leechers": {
"selector": [ "a[rel='torrent_leechers']" ]
},
"completed": {
"selector": [ "a[rel='times_completed']" ]
}
}
},
"torrentTagSelectors": [{
"name": "⛔️",
"selector": "div.torrent-box"
}],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"isLogged": {
"selector": [ "a#logout" ],
"filters": [ "query.length>0" ]
},
"id": {
"selector": ["#sidebar a[href*='profile']"],
"attribute": "href",
"filters": ["query ? query.getQueryString('memberid'):''"]
},
"name": {
"selector": ["#sidebar a[href*='profile']"]
},
"messageCount": {
"selector": ["a.a.showmenu.new"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
},
"bonus": {
"selector": [".showStats a[href*='p=market']"]
},
"bonusPerHour": {
"value": "N/A"
},
"seeding": {
"value": "N/A"
},
"seedingSize": {
"value": "N/A"
}
}
},
"userExtendInfo": {
"page": "/?p=profile&pid=18&memberid=$user.id$",
"fields": {
"levelName": {
"selector": ".memberCardDetails > span"
},
"uploaded": {
"selector": ["#memberinfoUpDownStats"],
"filters": ["query.text().trim().split('\\n\\t\\t\\t')", "(query && query.length > 1) ? (query[0].trim()).sizeToNumber() : 0"]
},
"downloaded": {
"selector": ["#memberinfoUpDownStats"],
"filters": ["query.text().trim().split('\\n\\t\\t\\t')", "(query && query.length > 2) ? (query[1].trim()).sizeToNumber() : 0"]
},
"ratio": {
"selector": ["#memberinfoUpDownStats"],
"filters": ["query.text().trim().split('\\n\\t\\t\\t')", "(query && query.length > 3) ? parseInt(query[2].trim()) : 0"]
},
"joinTime": {
"selector": ["div.memberCardDetails"],
"filters": ["query.clone().children().remove().end().text().trim().split('\\n\\t\\t')", "(query && query.length>=2) ? dateTime(query[2], 'DD-MM-YYYY HH:mm').valueOf() : ''"]
}
}
}
},
"supportedFeatures": {
"imdbSearch": false
}
}
================================================
FILE: resource/sites/leaves.red/config.json
================================================
{
"name": "红叶",
"description": "红叶成立于2022年10月,主打有声小说,有综合区。目前站内设立有声官组,资源产出稳定。喜欢有声内容的朋友,欢迎你的加入",
"url": "https://leaves.red/",
"icon": "https://leaves.red/favicon.ico",
"tags": ["有声书", "综合"],
"schema": "NexusPHP",
"host": "leaves.red",
"collaborator": "CosmoGao",
"plugins": [
{
"isCustom": true,
"name": "有声区",
"pages": [
"/special.php"
],
"readonly": false,
"script": "",
"scripts": [
"/schemas/nexusPHP/common.js",
"/schemas/nexusPHP/torrents.js"
],
"style": "",
"styles": []
}
],
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "100GB",
"ratio": "1.05",
"seedingPoints": "60000",
"privilege": "首次升级PU将获得1个邀请 "
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "200GB",
"ratio": "1.55",
"seedingPoints": "120000",
"privilege": "Elite User及以上等级用户封存账号(在控制面板)后不会被禁用账号"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "400GB",
"ratio": "2.05",
"seedingPoints": "200000",
"privilege": "首次升级CU将分别2个邀请"
},{
"level": "4",
"name": "Insane User",
"interval": "25",
"downloaded": "800GB",
"ratio": "2.55",
"seedingPoints": "400000",
"privilege": " "
},{
"level": "5",
"name": "Veteran User",
"interval": "40",
"downloaded": "1600GB",
"ratio": "3.05",
"seedingPoints": "600000",
"privilege": "Veteran User及以上等级用户会永远保留;首次升级VU将获得3个邀请"
},{
"level": "6",
"name": "Extreme User",
"interval": "60",
"downloaded": "2400GB",
"ratio": "3.55",
"seedingPoints": "800000",
"privilege": " "
},{
"level": "7",
"name": "Ultimate User",
"interval": "80",
"downloaded": "3200GB",
"ratio": "4.05",
"seedingPoints": "1000000",
"privilege": "首次升级UU将获得5邀请"
},{
"level": "8",
"name": "Nexus Master",
"interval": "100",
"downloaded": "4000GB",
"ratio": "4.55",
"seedingPoints": "2000000",
"privilege": "首次升级NM将获得10个邀请"
}],
"searchEntry": [
{
"entry": "/torrents.php?search=$key$&search_mode=2",
"name": "综合",
"enabled": true
},
{
"entry": "/special.php?search=$key$&search_mode=2",
"name": "有声",
"enabled": true
}
],
"selectors": {
"merge": true,
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["b:first"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)0 ) ? query[0].replace('总大小:', '').replace('<', '').trim() : 0",
"(query != 0) ? _self.getTotalSize([query]) : 0"
]
}
}
},
"bonusExtendInfo": {
"prerequisites": "!user.bonusPerHour",
"page": "/mybonus.php",
"fields": {
"bonusPerHour": {
"selector": ["#outer td[rowspan='3']"]
}
}
}
}
}
================================================
FILE: resource/sites/lztr.me/config.json
================================================
{
"name": "LzTr",
"timezoneOffset": "+0000",
"description": "music",
"url": "https://lztr.me/",
"icon": "https://lztr.me/favicon.ico",
"tags": ["音乐"],
"schema": "Gazelle",
"host": "lztr.me",
"collaborator": [
"ylxb2016",
"amorphobia"
],
"levelRequirements": [
{
"level": 1,
"name": "Member",
"interval": "1",
"uploaded": "10GB",
"ratio": "0.7",
"downloads": "1",
"privilege": "Can make requests, bookmarks, edit Collages, and can access the Top 10"
},
{
"level": 2,
"name": "Power User",
"interval": "2",
"uploads": "5",
"uploaded": "25GB",
"ratio": "1.05",
"privilege": "Receives invites, can access notifications, create new collages, access power user & invites forums."
},
{
"level": 3,
"name": "Elite",
"interval": "4",
"uploads": "50",
"uploaded": "100GB",
"ratio": "1.05",
"privilege": "Top 10 filters"
},
{
"level": 4,
"name": "Torrent Master",
"interval": "8",
"uploads": "200",
"uploaded": "200GB",
"ratio": "1.05",
"privilege": "Can invite users even when invites are closed, Can send unlimited invites"
}
],
"selectors": {
"levelExtendInfo": {
"page": "/user.php?action=user_ajax&type=community&id=$user.id$",
"fields": {
"seeding": {
"selector": "li:contains('Seeding:')",
"filters": ["query.text().match(/[\\d.]+/)", " query ? query[0] : null"]
},
"uploads": {
"selector": "li:contains('Uploaded:')",
"filters": ["query.text().match(/[\\d.]+/)", " query ? query[0] : null"]
},
"downloads": {
"selector": "li:contains('Snatched:')",
"filters": ["query.text().match(/[\\d.]+/)", " query ? query[0] : null"]
}
}
}
},
"supportedFeatures": {
"imdbSearch": false,
"userData": "◐"
}
}
================================================
FILE: resource/sites/monikadesign.uk/config.json
================================================
{
"name": "MDU",
"timezoneOffset": "+0800",
"schema": "UNIT3D",
"url": "https://monikadesign.uk/",
"icon": "https://monikadesign.uk/favicon.ico",
"description": "一个以动画为主体,涵盖日语影视音乐的资源站,诣在为广大动画、日剧日影、ACG Live爱好者提供一个资源信息交流平台。",
"tags": [
"影视",
"剧集",
"动漫"
],
"host": "monikadesign.uk",
"levelRequirements": [{
"level": "1",
"name": "PowerUser",
"interval": "4",
"uploaded": "1TB",
"privilege": "访问邀请区"
},{
"level": "2",
"name": "SuperUser",
"interval": "8",
"uploaded": "2TB",
"privilege": "无"
},{
"level": "3",
"name": "ExtremeUser",
"interval": "12",
"uploaded": "5TB",
"privilege": "无"
},{
"level": "4",
"name": "InsaneUser",
"interval": "18",
"uploaded": "10TB",
"privilege": "自动通过候选"
},{
"level": "5",
"name": "Veteran",
"interval": "36",
"uploaded": "15TB",
"privilege": "个人全局双倍上传"
}],
"collaborator": "fzlins",
"searchEntryConfig": {
"merge": true,
"resultSelector": "#torrent-list-table",
"fieldSelector": {
"subTitle": {
"selector": ["td.torrent-listings-overview span:first"]
}
}
},
"selectors": {
"bonusExtendInfo": {
"prerequisites": "!(!user.bonusPage)",
"page": "$user.bonusPage$",
"fields": {
"bonusPerHour": {
"selector": [".panelV2 div.panel__body:first"],
"filters": ["parseFloat(query.text().split(':')[1].replace(',',''))"]
}
}
}
}
}
================================================
FILE: resource/sites/nanyangpt.com/config.json
================================================
{
"name": "南洋PT",
"timezoneOffset": "+0800",
"description": "网站由西安交通大学学生自主创建与管理,汇集学习资料、纪录片、电影、剧集等各类优质资源",
"url": "https://nanyangpt.com/",
"icon": "https://nanyangpt.com/favicon.ico",
"tags": [
"教育网",
"影视",
"综合"
],
"schema": "NexusPHP",
"host": "nanyangpt.com",
"collaborator": ["Rhilip","Yincircle"],
"levelRequirements": [{
"level": "1",
"name": "小小学士",
"interval": "2",
"downloaded": "30GB",
"ratio": "1.5",
"privilege": "可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},{
"level": "2",
"name": "优秀硕士",
"interval": "5",
"downloaded": "50GB",
"ratio": "2.5",
"privilege": "优秀硕士及以上用户封存账号后不会被删除。"
},{
"level": "3",
"name": "初为博士",
"interval": "10",
"downloaded": "100GB",
"ratio": "3.5",
"privilege": "可以在做种/下载/发布的时候选择匿名模式,可以在邀请传送门版块发帖。"
},{
"level": "4",
"name": "海归博后",
"interval": "15",
"downloaded": "300GB",
"ratio": "4.5",
"privilege": "可以查看普通日志。"
},{
"level": "5",
"name": "大学讲师",
"interval": "20",
"downloaded": "500GB",
"ratio": "5.5",
"privilege": "可以查看排行榜;可以查看其它用户的评论、帖子历史。大学讲师及以上用户会永远保留账号。"
},{
"level": "6",
"name": "晋升副教",
"interval": "30",
"downloaded": "700GB",
"ratio": "6.5",
"privilege": "可以更新过期的外部信息;可以查看晋升副教论坛。"
},{
"level": "7",
"name": "终身教授",
"interval": "80",
"downloaded": "900GB",
"ratio": "7.5",
"privilege": "更加高级。"
},{
"level": "8",
"name": "荣誉院士",
"interval": "100",
"downloaded": "1TB",
"ratio": "8.5",
"privilege": "更加高级。"
}],
"searchEntry": [{
"name": "全站",
"enabled": true
},
{
"queryString": "cat401=1",
"name": "电影",
"enabled": false
},
{
"queryString": "cat402=1",
"name": "剧集",
"enabled": false
},
{
"queryString": "cat403=1",
"name": "动漫",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "综艺",
"enabled": false
},
{
"queryString": "cat405=1",
"name": "体育",
"enabled": false
},
{
"queryString": "cat406=1",
"name": "纪录",
"enabled": false
},
{
"queryString": "cat407=1",
"name": "音乐",
"enabled": false
},
{
"queryString": "cat408=1",
"name": "学习",
"enabled": false
},
{
"queryString": "cat409=1",
"name": "软件",
"enabled": false
},
{
"queryString": "cat410=1",
"name": "游戏",
"enabled": false
},
{
"queryString": "cat411=1",
"name": "其他",
"enabled": false
}
],
"searchEntryConfig": {
"merge": true,
"fieldSelector": {
"progress": {
"selector": [".rowfollow[title='Downloading'], .rowfollow[title='Seeding'], .rowfollow[title='Stopped'], .rowfollow[title='Completed']"],
"filters": ["query.text()?query.text():null"]
},
"status": {
"selector": [".rowfollow[title='Downloading']", ".rowfollow[title='Seeding']", ".rowfollow[title='Stopped']", ".rowfollow[title='Completed']"],
"switchFilters": [
["1"],
["2"],
["3"],
["255"]
]
}
}
},
"categories": [{
"entry": "torrents.php",
"result": "&cat$id$=1",
"category": [{
"id": 401,
"name": "电影"
},
{
"id": 402,
"name": "剧集"
},
{
"id": 403,
"name": "动漫"
},
{
"id": 404,
"name": "综艺"
},
{
"id": 405,
"name": "体育"
},
{
"id": 406,
"name": "纪录"
},
{
"id": 407,
"name": "音乐"
},
{
"id": 408,
"name": "学习"
},
{
"id": 409,
"name": "软件"
},
{
"id": 410,
"name": "游戏"
},
{
"id": 411,
"name": "其他"
}
]
}],
"mergeSchemaTagSelectors": true,
"torrentTagSelectors": [{
"name": "⛔️",
"selector": "td.embedded > a[title] > b > font[color='red']"
}]
}
================================================
FILE: resource/sites/nebulance.io/config.json
================================================
{
"name": "Nebulance",
"timezoneOffset": "+0000",
"description": "NBL",
"url": "https://nebulance.io/",
"icon": "https://nebulance.io/favicon.ico",
"tags": ["剧集"],
"schema": "Gazelle",
"host": "nebulance.io",
"collaborator": "luckiestone",
"searchEntryConfig": {
"page": "/torrents.php",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"queryString": "searchtext=$key$"
},
"searchEntry": [{
"name": "All",
"enabled": true
},
{
"name": "Episodes",
"queryString": "filter_cat[1]=1",
"enabled": false
},
{
"name": "Season",
"queryString": "filter_cat[3]=1",
"enabled": false
}
],
"selectors": {
"userBaseInfo": {
"page": "/ajax.php?action=index",
"dataType": "json",
"fields": {
"id": {
"selector": ["response.id"]
},
"name": {
"selector": ["response.username"]
},
"uploaded": {
"selector": ["response.userstats.uploaded"]
},
"downloaded": {
"selector": ["response.userstats.downloaded"]
},
"ratio": {
"selector": ["response.userstats.ratio"]
},
"levelName": {
"selector": ["response.userstats.class"]
}
}
},
"userExtendInfo": {
"page": "/user.php?id=$user.id$",
"fields": {
"messageCount": {
"selector": ["div.alertbar a[href*='inbox.php']"],
"filters": ["query.text().replace(/\\s+/g,'').match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
},
"seeding": {
"selector": "ul.stats.nobullet > li:contains('Seeding:')",
"filters": ["query.text().trim().replace(/,|\\n/g,'').match(/:.+?([\\d.]+)/)", "(query && query.length>=2)?parseFloat(query[1]):0"]
},
"seedingSize": {
"selector": "ul.stats.nobullet > li:contains('Seeding Size:')",
"filters": ["query.text().trim().replace(/,/g,'').match(/Seeding Size:.+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
},
"bonus": {
"selector": "ul#userinfo_major > li > a:contains('Cubits:')",
"filters": ["query.text().replace(/,/g,'').match(/Cubits:.+?([\\d.]+)/)", "(query && query.length>=2)?query[1]:0"]
},
"joinTime": {
"selector": ["ul.stats.nobullet > li:contains('Joined:') > span"],
"filters": ["query.attr('title')||query.text()", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
}
}
}
},
"supportedFeatures": {
"imdbSearch": false
}
}
================================================
FILE: resource/sites/nebulance.io/getSearchResult.js
================================================
if (!"".getQueryString) {
String.prototype.getQueryString = function(name, split) {
if (split == undefined) split = "&";
var reg = new RegExp(
"(^|" + split + "|\\?)" + name + "=([^" + split + "]*)(" + split + "|$)"
),
r;
if ((r = this.match(reg))) return decodeURI(r[2]);
return null;
};
}
(function(options) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/auth_form/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
if (
/没有种子|No [Tt]orrents?|Your search did not match anything|用准确的关键字重试/.test(
options.responseText
)
) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
let site = options.site;
let results = [];
// 获取种子列表行
let rows = options.page.find(
options.resultSelector || "table.torrent_table:first > tbody > tr"
);
if (rows.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return results;
}
// 获取表头
let header = rows.eq(0).find("th,td");
// 用于定位每个字段所列的位置
let fieldIndex = {
time: -1,
size: -1,
seeders: -1,
leechers: -1,
completed: -1,
comments: -1,
author: -1
};
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
// 获取字段所在的列
for (let index = 0; index < header.length; index++) {
const cell = header.eq(index);
// 发布时间
if (cell.find("a[href*='order_by=time']").length) {
fieldIndex.time = index;
continue;
}
// 大小
if (cell.find("a[href*='order_by=size']").length) {
fieldIndex.size = index;
continue;
}
// 种子数
if (cell.find("a[href*='order_by=seeders']").length) {
fieldIndex.seeders = index;
continue;
}
// 下载数
if (cell.find("a[href*='order_by=leechers']").length) {
fieldIndex.leechers = index;
continue;
}
// 完成数
if (cell.find("a[href*='order_by=snatched']").length) {
fieldIndex.completed = index;
continue;
}
}
try {
// 遍历数据行
for (let index = 1; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = row.find("a[href*='torrents.php?id=']").first();
if (title.length == 0) {
continue;
}
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
// 获取下载链接
let url = row
.find("a[href*='torrents.php?action=download']")
.first();
if (url.length == 0) {
continue;
}
url = url.attr("href");
if (url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
let time =
fieldIndex.time == -1
? ""
: cells.eq(fieldIndex.time).attr("title") ||
cells.eq(fieldIndex.time).text() ||
"";
if (time) {
time += ":00";
}
let data = {
title: title.attr("data-src"),
link,
url: url,
size: cells.eq(fieldIndex.size).find("div").first().text().replace(/,/g,'').trim() || 0,
time: time,
author:
fieldIndex.author == -1
? ""
: cells.eq(fieldIndex.author).text() || "",
seeders:
fieldIndex.seeders == -1
? ""
: cells.eq(fieldIndex.seeders).text() || 0,
leechers:
fieldIndex.leechers == -1
? ""
: cells.eq(fieldIndex.leechers).text() || 0,
completed:
fieldIndex.completed == -1
? ""
: cells.eq(fieldIndex.completed).text() || 0,
comments:
fieldIndex.comments == -1
? ""
: cells.eq(fieldIndex.comments).text() || 0,
site: site,
entryName: options.entry.name,
category:
fieldIndex.category == -1
? null
: this.getCategory(cells.eq(fieldIndex.category))
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
}
} catch (error) {
console.error(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.stack}`;
}
return results;
}
/**
* 获取分类
* @param {*} link 当前列
*/
getCategory(link) {
if (link.length == 0) {
return null;
}
let result = {
name: "",
link: ""
};
result.link = link.attr("href");
let id = result.link.match(/filter_cat\[(\d+)\]/)[1];
if (result.link.substr(0, 4) !== "http") {
result.link = options.site.url + result.link;
}
result.name = link.text().trim();
if (!result.name) {
result.name = this.getCategoryName(id);
}
return result;
}
getCategoryName(id) {
if ($.isEmptyObject(this.categories)) {
let cells = options.page.find(".cat_list:first").find("td");
cells.each((i, dom) => {
let id = $(dom)
.find("input")
.attr("id")
.replace("cat_", "");
let name = $(dom)
.find("label")
.text();
if (id) {
this.categories[id] = name;
}
});
}
return this.categories ? this.categories[id] : "";
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options);
================================================
FILE: resource/sites/nicept.net/config.json
================================================
{
"name": "NicePT",
"timezoneOffset": "+0800",
"description": "老师站,又称小馒头",
"url": "https://www.nicept.net/",
"icon": "https://www.nicept.net/favicon.ico",
"tags": [
"Adult"
],
"schema": "NexusPHP",
"host": "www.nicept.net",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"seedingPoints": "40000",
"privilege": "得到一個邀請名額;可以直接發布種子;可以檢視NFO文件;可以檢視用戶清單;可以要求續種; 可以傳送邀請; 可以檢視排行榜;可以檢視其他用戶的種子曆史(如果用戶隱私等級未設定為\"強\"); 可以移除自己上傳的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"seedingPoints": "80000",
"privilege": "Elite User及以上用戶封存賬號后不會被移除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"seedingPoints": "150000",
"privilege": "得到兩個邀請名額;可以在做種/下載/發布的時候選取匿名型態。"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"seedingPoints": "250000",
"privilege": "可以檢視普通日誌。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"seedingPoints": "400000",
"privilege": "得到三個邀請名額;可以檢視其他用戶的評論、帖子曆史。Veteran User及以上用戶會永遠保留賬號。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"seedingPoints": "600000",
"privilege": "可以更新過期的外部資訊;可以檢視Extreme User論壇。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"seedingPoints": "800000",
"privilege": "得到五個邀請名額。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"seedingPoints": "1000000",
"privilege": "得到十個邀請名額。"
}
],
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/總大小:(.*?)上一頁/g)",
"(query && query.length>0) ? query[0].replace('總大小:', '').replace('<< 上一頁', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
},
"collaborator": "DXV5",
"searchEntry": [{
"name": "全站",
"enabled": true
},
{
"queryString": "cat401=1",
"name": "无码(限制级)",
"enabled": false
},
{
"queryString": "cat500=1",
"name": "有码(限制级)",
"enabled": false
},
{
"queryString": "cat402=1",
"name": "三级情色(限制级)",
"enabled": false
},
{
"queryString": "cat501=1",
"name": "其他(限制级)",
"enabled": false
},
{
"queryString": "cat403=1",
"name": "动漫(限制级)",
"enabled": false
},
{
"queryString": "cat503=1",
"name": "真人秀,自拍(限制级)",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "套图(限制级)",
"enabled": false
},
{
"queryString": "cat504=1",
"name": "SM调教(限制级)",
"enabled": false
}
],
"categories": [{
"entry": "torrents.php",
"result": "&cat$id$=1",
"category": [{
"id": 401,
"name": "无码(限制级)"
},
{
"id": 500,
"name": "有码(限制级)"
},
{
"id": 402,
"name": "三级情色(限制级)"
},
{
"id": 501,
"name": "其他(限制级)"
},
{
"id": 403,
"name": "动漫(限制级)"
},
{
"id": 503,
"name": "真人秀,自拍(限制级)"
},
{
"id": 404,
"name": "套图(限制级)"
},
{
"id": 504,
"name": "SM调教(限制级)"
}
]
}]
}
================================================
FILE: resource/sites/npupt.com/config.json
================================================
{
"name": "NPUBits",
"timezoneOffset": "+0800",
"description": "界面独具一格的教育网站点",
"url": "https://npupt.com/",
"icon": "https://npupt.com/favicon.ico",
"tags": [
"教育网",
"综合"
],
"schema": "NexusPHP",
"host": "npupt.com",
"collaborator": ["Rhilip", "xfl03"],
"searchEntryConfig": {
"parseScriptFile": "getSearchResult.js"
},
"searchEntry": [
{
"name": "全部",
"enabled": true
},
{
"name": "资料",
"queryString": "cat=411",
"enabled": false
},
{
"name": "电影",
"queryString": "cat=401",
"enabled": false
},
{
"name": "动漫",
"queryString": "cat=405",
"enabled": false
},
{
"name": "剧集",
"queryString": "cat=402",
"enabled": false
},
{
"name": "综艺",
"queryString": "cat=403",
"enabled": false
},
{
"name": "体育",
"queryString": "cat=407",
"enabled": false
},
{
"name": "纪录",
"queryString": "cat=404",
"enabled": false
},
{
"name": "音乐",
"queryString": "cat=414",
"enabled": false
},
{
"name": "MV",
"queryString": "cat=406",
"enabled": false
},
{
"name": "软件",
"queryString": "cat=408",
"enabled": false
},
{
"name": "游戏",
"queryString": "cat=410",
"enabled": false
},
{
"name": "校园",
"queryString": "cat=412",
"enabled": false
},
{
"name": "其他",
"queryString": "cat=409",
"enabled": false
}
],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": "span#curuser a[href*='userdetails.php'][class*='Name']:first",
"attribute": "href",
"filters": [
"query ? query.getQueryString('id'):''"
]
},
"name": {
"selector": "span#curuser a[href*='userdetails.php'][class*='Name']:first"
},
"isLogged": {
"selector": [
"a[href*='logout.php']"
],
"filters": [
"query.length>0"
]
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": [
"td.rowfollow:contains('分享率')",
"td.rowhead:contains('传输') + td"
],
"filters": [
"query.text().replace(/,/g,'').match(/上[传傳]量.+?([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
]
},
"downloaded": {
"selector": [
"td.rowfollow:contains('分享率')",
"td.rowhead:contains('传输') + td"
],
"filters": [
"query.text().replace(/,/g,'').match(/下[载載]量.+?([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
]
},
"ratio": {
"selector": "td.rowfollow:contains('分享率')",
"filters": [
"query.text().replace(/,/g,'').match(/分享率.+?([\\d.]+|无限)/)",
"(query && query.length>=2)?query[1]:0"
]
},
"levelName": {
"selector": "td.rowhead:contains('等級'), td.rowhead:contains('等级')",
"filters": [
"query.next().find('img').attr('title')"
]
},
"bonus": {
"selector": [
"td.rowhead:contains('沙粒') + td"
],
"filters": [
"query.is(\":contains('沙粒:')\")?query.text().replace(/,/g,'').match(/沙粒.+?([\\d.]+)/)[1]:query.text().replace(/,/g,'')",
"parseFloat(query)"
]
},
"joinTime": {
"selector": "td.rowhead:contains('加入日期')",
"filters": [
"query.next().text().split(' (')[0]",
"dateTime(query).isValid()?dateTime(query).valueOf():query"
]
}
}
},
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"tr:not(:eq(0))"
],
"filters": [
"query.find('td.rowfollow:eq(2)').length"
]
},
"seedingSize": {
"selector": [
"tr:not(:eq(0))"
],
"filters": [
"jQuery.map(query.find('td.rowfollow:eq(2)'), (item)=>{return $(item).text();})",
"_self.getTotalSize(query)"
]
}
}
},
"/details.php": {
"fields": {
"downloadURL": {
"selector": [
"a[href*='passkey'][href*='https']"
],
"filters": [
"query.attr('href').match(/https?:\\/\\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/g)",
"(query && query.length > 0) ? query[0] : ''"
]
}
}
}
}
}
================================================
FILE: resource/sites/npupt.com/getSearchResult.js
================================================
/**
* @see https://github.com/Rhilip/PT-help/blob/master/docs/js/ptsearch.user.js
*/
(function(options) {
class Parser {
constructor() {
this.haveData = false;
if (/login|未登录/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
if (/找到0条结果/.test(options.responseText)) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let site = options.site;
let results = [];
const time_regex = /(\d{4}-\d{2}-\d{2}[^\d]+?\d{2}:\d{2}:\d{2})/;
// 以下解析方法修改自 : https://github.com/Rhilip/PT-help/blob/master/docs/js/ptsearch.user.js#L216_L241
let tr_list = options.page.find("#torrents_table > tbody > tr:gt(0)");
for (let i = 0; i < tr_list.length; i++) {
let torrent_data_raw = tr_list.eq(i);
// 标题信息
let _title_tag = torrent_data_raw.find("a[href*='hit']:eq(0)");
let _title = _title_tag.attr("title") || _title_tag.text();
let _sub_title_tag = _title_tag.siblings("span");
let _sub_title = _sub_title_tag
? _sub_title_tag.attr("title") || _sub_title_tag.text()
: "";
// 下载链接 (该站搜索页点击下载按钮是一个JavaScript事件)
let details_tag = torrent_data_raw.find('a[href^="details"]');
let details_link = details_tag.attr("href");
let _download_url =
site.url +
details_link.replace("details", "download") +
"&trackerssl=1";
// 定位种子大小,做种和优惠tag
let _size_peer_block = torrent_data_raw.find(
".rowfollow.vcenter.nowrap"
);
let _size_tag = _size_peer_block.find("center");
let _seeders_tag = _size_peer_block.find("span.badge").eq(0);
let _leechers_tag = _size_peer_block.find("span.badge").eq(1);
let _completed_tag = torrent_data_raw.find(
"a[href^='viewsnatches.php?id=']"
);
let _buff_tag = _title_tag.parent("td.embedded"); // 转交给 this.getTags() 处理
// 发布时间
let _date_tag = torrent_data_raw.find("div.small").filter(function() {
return time_regex.test(
$(this).html()
);
});
let _date = ((_date_tag.html().match(time_regex) || ["", "0000-00-00 00:00:00"] )[1]).trim();
// 做种,评论信息
let _tag_comments = torrent_data_raw.find("a[href$='#startcomments']");
let _comments = 0;
if (_tag_comments) {
_comments =
_tag_comments
.text()
.trim()
.replace(",", "") || 0;
}
let _category = torrent_data_raw
.find("div.category_text")
.text()
.trim();
let data = {
title: _title,
subTitle: _sub_title,
link: site.url + _title_tag.attr("href"),
url: _download_url,
size: _size_tag.text() || 0,
time: _date,
// author, // 该站种子列表无author信息
seeders: _seeders_tag.text().replace(",", "") || 0,
leechers: _leechers_tag.text().replace(",", "") || 0,
completed: _completed_tag
? _completed_tag.text().replace(",", "")
: 0,
comments: _comments,
site: site,
tags: this.getTags(_buff_tag, options.torrentTagSelectors),
entryName: options.entry.name,
category: _category
};
results.push(data);
}
return results;
}
/**
* 获取标签
* @param {*} row
* @param {*} selectors
* @return array
*/
getTags(row, selectors) {
let tags = [];
if (selectors && selectors.length > 0) {
// 使用 some 避免错误的背景类名返回多个标签
selectors.some(item => {
if (item.selector) {
let result = row.find(item.selector);
if (result.length) {
tags.push({
name: item.name,
color: item.color
});
return true;
}
}
});
}
return tags;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options);
================================================
FILE: resource/sites/oldtoons.world/config.json
================================================
{
"name": "ihdbits",
"schema": "NexusPHP",
"url": "https://oldtoons.world/",
"description": "",
"icon": "https://oldtoons.world/favicon.ico",
"tags": [
"影视"
],
"host": "oldtoons.world",
"collaborator": "koal",
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["b:first"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/open.cd/config.json
================================================
{
"name": "OpenCD",
"timezoneOffset": "+0800",
"description": "皇后,专一的音乐类PT站,是目前国内最大的无损音乐PT",
"url": "https://open.cd/",
"icon": "https://open.cd/favicon.ico",
"tags": ["音乐"],
"schema": "NexusPHP",
"host": "open.cd",
"collaborator": ["*", "cnsunyour"],
"levelRequirements": [{
"level": "1",
"name": "常在-正七品(Power User)",
"interval": "5",
"ratio": "1.5",
"alternative": {
"downloaded": "20GB",
"uploads": "5"
},
"privilege": "得到一个邀请名额;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},{
"level": "2",
"name": "贵人-正六品(Elite User)",
"interval": "10",
"ratio": "2.0",
"alternative": {
"downloaded": "60GB",
"uploads": "20"
},
"privilege": "得到两个邀请名额;贵人-正六品(Elite User)及以上用户封存账号后规定时间内不会被删除;发布三个种子后无需经过候选 可直接发布种子。"
},{
"level": "3",
"name": "良媛-正五品(Crazy User)",
"interval": "15",
"ratio": "2.5",
"alternative": {
"downloaded": "200GB",
"uploads": "50"
},
"privilege": "得到三个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},{
"level": "4",
"name": "容华-正四品(Insane User)",
"interval": "20",
"ratio": "3.0",
"alternative": {
"downloaded": "400GB",
"uploads": "100"
},
"privilege": "得到四个邀请名额;可以查看普通日志。"
},{
"level": "5",
"name": "贵嫔-正三品(Veteran User)",
"interval": "25",
"ratio": "3.5",
"alternative": {
"downloaded": "600GB",
"uploads": "200"
},
"privilege": "得到五个邀请名额;可以查看用户列表,可以查看其它用户的评论、帖子历史。贵嫔-正三品(Veteran User)及以上用户会永远保留账号。"
},{
"level": "6",
"name": "淑仪-正二品(Extreme User)",
"interval": "25",
"ratio": "4.0",
"alternative": {
"downloaded": "1TB",
"uploads": "300"
},
"privilege": "得到六个邀请名额;可以更新过期的外部信息。"
},{
"level": "7",
"name": "贵妃-正一品(Ultimate User)",
"interval": "30",
"ratio": "4.5",
"alternative": {
"downloaded": "2TB",
"uploads": "450"
},
"privilege": "得到七个邀请名额;查看种子文件的结构。"
},{
"level": "8",
"name": "皇后(Nexus Master)",
"interval": "30",
"ratio": "5.0",
"alternative": {
"downloaded": "3TB",
"uploads": "600"
},
"privilege": "得到十个邀请名额。"
}],
"searchEntryConfig": {
"skipIMDbId": true,
"fieldSelector": {
"progress": {
"selector": [".progress:eq(0) > div"],
"filters": ["query.attr('style')||''", "query.match(/width:([ \\d.]+)%/)", "(query && query.length>=2)?query[1]:null"]
},
"status": {
"selector": ["div.progress_seeding", "div.progress_completed, div.progress_completed_hr", "div.progress_no_downloading", "div.progress_downloading"],
"switchFilters": [
[2],
[255],
[3],
[1]
]
}
}
},
"searchEntry": [{
"appendQueryString": "&boardid=2",
"name": "原抓区",
"enabled": true
}, {
"appendQueryString": "&boardid=1",
"name": "普通区",
"enabled": true
}],
"categories": [{
"entry": "*",
"result": "&source$id$=1",
"category": [{
"id": 2,
"name": "流行(Pop)"
}, {
"id": 3,
"name": "古典(Classical)"
}, {
"id": 11,
"name": "器乐(Instrumental)"
}, {
"id": 4,
"name": "原声(OST)"
}, {
"id": 5,
"name": "摇滚(Rock)"
}, {
"id": 8,
"name": "爵士(Jazz)"
}, {
"id": 12,
"name": "新世纪(NewAge)"
}, {
"id": 13,
"name": "舞曲(Dance)"
}, {
"id": 14,
"name": "电子(Electronic)"
}, {
"id": 15,
"name": "民谣(Folk)"
}, {
"id": 16,
"name": "独立(Indie)"
}, {
"id": 17,
"name": "嘻哈(Hip Hop)"
}, {
"id": 9,
"name": "其他(Others)"
}]
}],
"selectors": {
"userExtendInfo": {
"merge": true,
"fields": {
"seeding": {
"selector": ["div#ka1"],
"filters": ["query.parent().text().match(/\\(([\\d.]+)个种子/)", "(query && query.length>=2)?query[1]:0"]
},
"seedingSize": {
"selector": ["div#ka1"],
"filters": ["query.parent().text().match(/共计([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
}
}
}
},
"mergeSchemaTagSelectors": true,
"torrentTagSelectors": [{
"name": "⛔️",
"selector": "img[src*='pic/share_rule_1.gif']"
}]
}
================================================
FILE: resource/sites/orpheus.network/config.json
================================================
{
"name": "OPS",
"timezoneOffset": "+0000",
"description": "music",
"url": "https://orpheus.network/",
"icon": "https://orpheus.network/favicon.ico",
"tags": ["音乐"],
"schema": "GazelleJSONAPI",
"host": "orpheus.network",
"collaborator": ["ylxb2016", "enigmaz"],
"searchEntryConfig": {
"skipIMDbId": true
},
"selectors": {
"userSeedingTorrents": {
"page": "/bonus.php?action=bprates",
"fields": {
"seedingSize": {
"selector": ["div#content > table > tbody > tr > td:eq(1)"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
},
"bonus": {
"selector": ["div#content > table > tbody > tr > td:eq(2)"],
"filters": ["query.text().replace(/,/g,'')"]
}
}
}
},
"supportedFeatures": {
"imdbSearch": false,
"userData": "◐"
}
}
================================================
FILE: resource/sites/ourbits.club/config.json
================================================
{
"name": "OurBits",
"timezoneOffset": "+0800",
"description": "综合性网站,有分享率要求",
"url": "https://ourbits.club/",
"icon": "https://ourbits.club/favicon.ico",
"tags": [
"影视",
"动漫",
"纪录片",
"综艺"
],
"schema": "NexusPHP",
"host": "ourbits.club",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "5",
"downloaded": "100GB",
"ratio": "2.0",
"privilege": "可以查看NFO文档;可以查看用户列表;可以请求续种;可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\");可以删除自己上传的字幕。最多可以同时下载20个种子"
},{
"level": "2",
"name": "Elite User",
"interval": "10",
"downloaded": "350GB",
"ratio": "2.5",
"privilege": "Elite User及以上用户封存账号后不会被删除。此等级及以上没有下载数限制。可以查看论坛Elite User(邀请交流版)"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "500GB",
"ratio": "3.0",
"privilege": "可以在做种/下载/发布的时候选择匿名模式"
},{
"level": "4",
"name": "Insane User",
"interval": "20",
"downloaded": "1TB",
"ratio": "3.5",
"privilege": "可以查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "25",
"downloaded": "2TB",
"ratio": "4.0",
"privilege": "可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号"
},{
"level": "6",
"name": "Extreme User",
"interval": "30",
"downloaded": "4TB",
"ratio": "4.5",
"privilege": "得到一个永久邀请;可以更新过期的外部信息"
},{
"level": "7",
"name": "Ultimate User",
"interval": "40",
"downloaded": "6TB",
"ratio": "5.0",
"privilege": "得到两个永久邀请"
},{
"level": "8",
"name": "Nexus Master",
"interval": "52",
"downloaded": "8TB",
"ratio": "5.5",
"privilege": "得到三个永久邀请"
}],
"collaborator": "Rhilip",
"searchEntry": [{
"name": "全站",
"enabled": true
},
{
"queryString": "cat=401",
"name": "Movies",
"enabled": false
},
{
"queryString": "cat=402",
"name": "Movies-3D",
"enabled": false
},
{
"queryString": "cat=419",
"name": "Concert",
"enabled": false
},
{
"queryString": "cat=412",
"name": "TV-Episode",
"enabled": false
},
{
"queryString": "cat=405",
"name": "TV-Pack",
"enabled": false
},
{
"queryString": "cat=413",
"name": "TV-Show",
"enabled": false
},
{
"queryString": "cat=410",
"name": "Documentary",
"enabled": false
},
{
"queryString": "cat=411",
"name": "Animation",
"enabled": false
},
{
"queryString": "cat=415",
"name": "Sports",
"enabled": false
},
{
"queryString": "cat=414",
"name": "Music-Video",
"enabled": false
},
{
"queryString": "cat=416",
"name": "Music",
"enabled": false
}
],
"categories": [{
"entry": "*",
"result": "&cat[]=$id$",
"category": [{
"id": 401,
"name": "Movies"
},
{
"id": 402,
"name": "Movies-3D"
},
{
"id": 419,
"name": "Concert"
},
{
"id": 412,
"name": "TV-Episode"
},
{
"id": 405,
"name": "TV-Pack"
},
{
"id": 413,
"name": "TV-Show"
},
{
"id": 410,
"name": "Documentary"
},
{
"id": 411,
"name": "Animation"
},
{
"id": 415,
"name": "Sports"
},
{
"id": 414,
"name": "Music-Video"
},
{
"id": 416,
"name": "Music"
}
]
}],
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["div.progressBar > div"],
"filters": ["query.attr('style')||''", "query.match(/width:.?(\\d.+)%/)", "(query && query.length>=2)?query[1]:null"]
},
"status": {
"selector": ["div.progressBar.doing > div", "div.progressBar > div"],
"switchFilters": [
["query.attr('style')||''", "query.match(/width:.?(\\d.+)%/)", "(query && query.length>=2)?query[1]:0", "parseInt(query)==100?2:1"],
["255"]
]
}
}
},
"plugins": [{
"name": "保种列表",
"pages": ["/rescue.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/NexusPHP/torrents.js"]
}],
"mergeSchemaTagSelectors": true,
"torrentTagSelectors": [{
"name": "⛔️",
"selector": "div.tag-jz"
}]
}
================================================
FILE: resource/sites/passthepopcorn.me/config.json
================================================
{
"name": "PTP",
"timezoneOffset": "+0000",
"description": "电影",
"url": "https://passthepopcorn.me/",
"icon": "https://passthepopcorn.me/favicon.ico",
"tags": ["电影"],
"schema": "Gazelle",
"host": "passthepopcorn.me",
"collaborator": "lengmianxia",
"searchEntryConfig": {
"page": "/torrents.php",
"resultType": "json",
"parseScriptFile": "getSearchResult.js",
"queryString": "searchstr=$key$&grouping=0&inallakas=1&json=noredirect"
},
"searchEntry": [{
"name": "Normal",
"enabled": true
},
{
"name": "filelist",
"skipIMDbId": true,
"queryString":"filelist=$key$&grouping=0&json=noredirect",
"enabled": false
}],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": ["a.user-info-bar__link[href*='user.php']:first"],
"attribute": "href",
"filters": ["query ? query.getQueryString('id'):''"]
},
"name": {
"selector": ["a.user-info-bar__link[href*='user.php']:first"]
},
"isLogged": {
"selector": ["a[href*='logout.php']"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["div.alert-bar a[href*='inbox.php']"],
"filters": ["query.text().replace(/\\s+/g,'').match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
}
}
},
"userExtendInfo": {
"page": "/user.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": ["a.user-info-bar__link[href*='type=seeding']:first"],
"filters": ["query.attr('title').replace(/,/g,'').sizeToNumber()"]
},
"downloaded": {
"selector": ["a.user-info-bar__link[href*='type=leeching']:first"],
"filters": ["query.attr('title').replace(/,/g,'').sizeToNumber()"]
},
"ratio": {
"selector": "ul.list > li:contains('Ratio:')",
"filters": ["query.text().replace(/,|\\n|\\s+/g,'').match(/Ratio.+?([\\d.]+)/)", "(query && query.length>=2)?query[1]:null"]
},
"seeding": {
"selector": "ul.list > li:contains('Seeding:')",
"filters": ["query.text().trim().replace(/,|\\n/g,'').match(/:.+?([\\d.]+)/)", "(query && query.length>=2)?parseFloat(query[1]):null"]
},
"seedingSize": {
"selector": "ul.list > li:contains('Seeding size:')",
"filters": ["query.text().trim().replace(/,/g,'').match(/:.+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
},
"levelName": {
"selector": "ul.list > li:contains('Class:')",
"filters": ["query.text().replace(/,|\\n|\\s+/g,'').match(/Class:(.+)/)", "(query && query.length>=2)?query[1]:''"]
},
"bonus": {
"selector": ["ul.list > li:contains('Points:')", "div:contains('Stats') + ul.stats > li:contains('SeedBonus:')"],
"filters": ["query.text().replace(/,|\\n|\\s+/g,'')", "query.match(/Points.+?([\\d.]+)/)||query.match(/SeedBonus.+?([\\d.]+)/)", "(query && query.length>=2)?query[1]:0"]
},
"joinTime": {
"selector": ["ul.list > li:contains('Joined:') > span"],
"filters": ["query.attr('title')||query.text()", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
}
}
},
"userSeedingTorrents": {
"page": "/torrents.php?type=seeding&userid=$user.id$",
"parser": "getUserSeedingTorrents.js",
"fields": {
"seedingList": {
"selector": ["script:last"],
"filters": ["query.text()", "[...query.matchAll(/\"TorrentId\":(\\d+)/g)]", "jQuery.map(query, i=>i[1])"]
}
}
},
"common": {
"page": "/torrents.php",
"fields": {
"confirmSize": {
"selector": ["tr.basic-movie-list__torrent-row > td:contains('iB')"],
"filters": ["query"]
}
}
}
}
}
================================================
FILE: resource/sites/passthepopcorn.me/getSearchResult.js
================================================
if (!"".getQueryString) {
String.prototype.getQueryString = function(name, split) {
if (split == undefined) split = "&";
var reg = new RegExp(
"(^|" + split + "|\\?)" + name + "=([^" + split + "]*)(" + split + "|$)"
),
r;
if ((r = this.match(reg))) return decodeURI(r[2]);
return null;
};
}
(function(options) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/auth_form/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let site = options.site;
// 获取种子列表行
let Movies = options.page.Movies;
if (Movies.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
return [];
}
let results = [];
let authkey = options.page.AuthKey;
let passkey = options.page.PassKey;
console.log("Movies.length", Movies.length);
//console.log("Movies", Movies.text());
try {
// 遍历数据行
for (let index = 0; index < Movies.length; index++) {
let row = Movies[index];
let torrent = row.Torrents[0];
let data = {
id: `${torrent.Id}`,
title:
row.Title +
"[" +
row.Year +
"]" +
"-" +
torrent.Codec +
"/" +
torrent.Container +
"/" +
torrent.Source +
"/" +
torrent.Resolution,
subTitle: torrent.ReleaseName,
link: `${site.url}torrents.php?id=${row.GroupId}&torrentid=${
torrent.Id
}`,
url: `${site.url}torrents.php?action=download&id=${
torrent.Id
}&authkey=${authkey}&torrent_pass=${passkey}`,
size: parseFloat(torrent.Size),
time: torrent.UploadTime,
author: "",
seeders: torrent.Seeders,
leechers: torrent.Leechers,
completed: torrent.Snatched,
comments: 0,
site: site,
tags: null,
entryName: options.entry.name,
category: "Movie"
};
results.push(data);
}
console.log("results.length", results.length);
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
}
} catch (error) {
console.log(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack;
}
return results;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options);
================================================
FILE: resource/sites/passthepopcorn.me/getUserSeedingTorrents.js
================================================
(function(options, User) {
class Parser {
constructor(options, dataURL) {
this.options = options;
this.dataURL = dataURL;
this.body = null;
this.rawData = "";
this.pageInfo = {
count: 0,
current: 1
};
this.result = {
seedingList: []
};
this.load();
}
/**
* 完成
*/
done() {
this.options.resolve(this.result);
}
/**
* 解析内容
*/
parse() {
const doc = new DOMParser().parseFromString(this.rawData, "text/html");
// 构造 jQuery 对象
this.body = $(doc).find("body");
this.getPageInfo();
let results = new User.InfoParser(User.service).getResult(
this.body,
this.options.rule
);
if (results) {
this.result.seedingList = this.result.seedingList.concat(results.seedingList)
}
// 是否已到最后一页
if (this.pageInfo.current < this.pageInfo.count) {
this.pageInfo.current++;
this.load();
} else {
this.done();
}
}
/**
* 获取页面相关内容
*/
getPageInfo() {
if (this.pageInfo.count > 0) {
return;
}
// 获取最大页码
const infos = this.body
.find("a[href*='torrents.php?page=']:contains('Last'):last")
.attr("href");
if (infos) {
this.pageInfo.count = parseInt(infos.getQueryString("page"));
} else {
this.pageInfo.count = 2;
}
}
/**
* 加载当前页内容
*/
load() {
let url = this.dataURL;
if (this.pageInfo.current > 1) {
url += "&page=" + this.pageInfo.current;
}
$.get(url)
.done(result => {
this.rawData = result;
this.parse();
})
.fail(() => {
this.done();
});
}
}
let dataURL = options.site.activeURL + options.rule.page;
dataURL = dataURL
.replace("$user.id$", options.userInfo.id)
.replace("$user.name$", options.userInfo.name)
.replace("://", "****")
.replace(/\/\//g, "/")
.replace("****", "://");
new Parser(options, dataURL);
})(_options, _self);
/**
*
_options 表示当前参数
{
site,
rule,
userInfo,
resolve,
reject
}
_self 表示 User(/src/background/user.ts) 类实例
*/
================================================
FILE: resource/sites/passthepopcorn.me/torrents.js
================================================
(function($) {
console.log("this is torrent.js");
class App extends window.NexusPHPCommon {
init() {
// super();
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $("a[title='Download']").toArray();
if (links.length == 0) {
// 排除使用免费令牌的链接
links = $(
"a[href*='torrents.php?action=download']:not([href*='usetoken'])"
).toArray();
}
if (links.length == 0) {
return this.t("getDownloadURLsFailed"); //"获取下载链接失败,未能正确定位到链接";
}
let urls = $.map(links, item => {
let link = $(item).attr("href");
return this.getFullURL(link);
});
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("tr.basic-movie-list__torrent-row > td:contains('iB')")
);
}
/**
* 下载拖放的种子
* @param {*} url
* @param {*} callback
*/
downloadFromDroper(data, callback) {
if (typeof data === "string") {
data = {
url: data,
title: ""
};
}
console.log(data);
if (!data.url) {
PTService.showNotice({
msg: this.t("invalidURL") //"无效的链接"
});
callback();
return;
}
let authkey = data.url.getQueryString("authkey");
let torrent_pass = data.url.getQueryString("torrent_pass");
// authkey=&torrent_pass
if (!authkey && !torrent_pass) {
PTService.showNotice({
msg: this.t("dropInvalidURL") //"无效的链接,请拖放下载链接"
});
callback();
return;
}
data.url = this.getFullURL(data.url);
this.sendTorrentToDefaultClient(data)
.then(result => {
callback(result);
})
.catch(result => {
callback(result);
});
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/piggo.me/config.json
================================================
{
"name": "Pig",
"timezoneOffset": "+0800",
"description": "Pig",
"url": "https://piggo.me/",
"icon": "https://piggo.me/favicon.ico",
"tags": [
"综合",
"3D原盘",
"儿童区"
],
"schema": "NexusPHP",
"host": "piggo.me",
"plugins": [
{
"isCustom": true,
"name": "儿童专区",
"pages": [
"/special.php"
],
"readonly": false,
"script": "",
"scripts": [
"/schemas/nexusPHP/common.js",
"/schemas/nexusPHP/torrents.js"
],
"style": "",
"styles": []
}
],
"priority": 100,
"searchEntry": [
{
"enabled": true,
"entry": "/search.php",
"isCustom": true,
"name": "全站搜索",
"resultType": "html",
"valid": true
}
],
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "100GB",
"ratio": "2.0",
"seedingPoints": "40000",
"privilege": "可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种;可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\");可以删除自己上传的字幕"
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "300GB",
"ratio": "2.6",
"seedingPoints": "80000",
"privilege": "Elite User及以上用户封存账号后不会被删除"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "500GB",
"ratio": "3.0",
"seedingPoints": "150000",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式"
},{
"level": "4",
"name": "Insane User",
"interval": "25",
"downloaded": "1TB",
"ratio": "3.6",
"seedingPoints": "250000",
"privilege": "可以查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "40",
"downloaded": "3TB",
"ratio": "4",
"seedingPoints": "400000",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号"
},{
"level": "6",
"name": "Extreme User",
"interval": "60",
"downloaded": "3TB",
"ratio": "4.6",
"seedingPoints": "600000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛"
},{
"level": "7",
"name": "Ultimate User",
"interval": "80",
"downloaded": "4TB",
"ratio": "5.0",
"seedingPoints": "800000",
"privilege": "得到五个邀请名额"
},{
"level": "8",
"name": "Nexus Master",
"interval": "100",
"downloaded": "6TB",
"ratio": "6.0",
"seedingPoints": "1000000",
"privilege": "得到十个邀请名额"
}],
"collaborator": "koal",
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/pt.0ff.cc/config.json
================================================
{
"name": "Farm",
"timezoneOffset": "+0800",
"description": "Farm",
"url": "https://pt.0ff.cc/",
"icon": "https://pt.0ff.cc/favicon.ico",
"tags": [],
"schema": "NexusPHP",
"host": "pt.0ff.cc",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"seedingPoints": "40000",
"privilege": "得到一个邀请名额;可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"seedingPoints": "80000",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"seedingPoints": "150000",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"seedingPoints": "250000",
"privilege": "可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"seedingPoints": "400000",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"seedingPoints": "600000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"seedingPoints": "800000",
"privilege": "得到五个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"seedingPoints": "1000000",
"privilege": "得到十个邀请名额。"
}
],
"collaborator": "koal",
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/pt.2xfree.org/config.json
================================================
{
"name": "2xFree",
"timezoneOffset": "+0800",
"description": "2xFree",
"url": "https://pt.2xfree.org/",
"icon": "https://pt.2xfree.org/favicon.ico",
"tags": [
"综合",
"VR",
"成人"
],
"schema": "NexusPHP",
"host": "pt.2xfree.org",
"collaborator": [
"ysmox",
"IITII"
],
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"downloaded": "100GB",
"ratio": "1.05",
"seedingPoints": "3000",
"privilege": "得到一个邀请名额;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "1T",
"ratio": "1.55",
"seedingPoints": "80000",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "2T",
"ratio": "2.05",
"seedingPoints": "150000",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"downloaded": "4T",
"ratio": "2.55",
"seedingPoints": "250000",
"privilege": "可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "52",
"downloaded": "8T",
"ratio": "3.05",
"seedingPoints": "400000",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "80",
"downloaded": "16T",
"ratio": "3.55",
"seedingPoints": "600000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "104",
"downloaded": "35000GB",
"ratio": "4.05",
"seedingPoints": "800000",
"privilege": "得到五个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "130",
"downloaded": "70000GB",
"ratio": "4.55",
"seedingPoints": "1000000",
"privilege": "得到十个邀请名额。"
}
],
"searchEntry": [
{
"name": "全站",
"enabled": true
},
{
"queryString": "cat401=1",
"name": "电影",
"enabled": false
},
{
"queryString": "cat402=1",
"name": "剧集",
"enabled": false
},
{
"queryString": "cat403=1",
"name": "综艺",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "纪录片",
"enabled": false
},
{
"queryString": "cat405=1",
"name": "动漫",
"enabled": false
},
{
"queryString": "cat406=1",
"name": "MV",
"enabled": false
},
{
"queryString": "cat407=1",
"name": "体育",
"enabled": false
},
{
"queryString": "cat408=1",
"name": "音乐",
"enabled": false
},
{
"queryString": "cat409=1",
"name": "其他",
"enabled": false
},
{
"queryString": "cat410=1",
"name": "电子书",
"enabled": false
},
{
"queryString": "cat411=1",
"name": "游戏",
"enabled": false
}
],
"categories": [
{
"entry": "*",
"result": "&cat$id$=1",
"category": [
{
"id": 401,
"name": "电影"
},
{
"id": 402,
"name": "剧集"
},
{
"id": 403,
"name": "综艺"
},
{
"id": 404,
"name": "纪录片"
},
{
"id": 405,
"name": "动漫"
},
{
"id": 406,
"name": "MV"
},
{
"id": 407,
"name": "体育"
},
{
"id": 408,
"name": "音乐"
},
{
"id": 409,
"name": "其他"
},
{
"id": 409,
"name": "电子书"
},
{
"id": 411,
"name": "游戏"
}
]
}
],
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/pt.btschool.club/config.json
================================================
{
"name": "BTSCHOOL",
"timezoneOffset": "+0800",
"description": "汇聚每一个人的影响力",
"url": "https://pt.btschool.club/",
"icon": "https://pt.btschool.club/favicon.ico",
"tags": [ "影视", "综合" ],
"schema": "NexusPHP",
"host": "pt.btschool.club",
"formerHosts": [
"pt.btschool.net"
],
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "2.0",
"seedingPoints": "40000",
"privilege": "一个邀请名额;查看NFO文档;查看用户列表;请求续种;查看其它用户的种子历史; 删除自己上传的字幕。"
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "100GB",
"ratio": "2.5",
"seedingPoints": "80000",
"privilege": "直接发布种子; 查看排行榜"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "3.0",
"seedingPoints": "150000",
"privilege": "两个邀请名额;在做种/下载/发布的时候选择匿名模式"
},{
"level": "4",
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "3.5",
"seedingPoints": "250000",
"privilege": "查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "40",
"downloaded": "1TB",
"ratio": "4.0",
"seedingPoints": "400000",
"privilege": "三个邀请名额;查看其它用户的评论、帖子历史;封存账号后不会被删除"
},{
"level": "6",
"name": "Extreme User",
"interval": "60",
"downloaded": "2TB",
"ratio": "4.5",
"seedingPoints": "600000",
"privilege": "更新过期的外部信息;查看Extreme User论坛;永远保留账号"
},{
"level": "7",
"name": "Ultimate User",
"interval": "80",
"downloaded": "5TB",
"ratio": "5.0",
"seedingPoints": "800000",
"privilege": "五个邀请名额"
},{
"level": "8",
"name": "Nexus Master",
"interval": "100",
"downloaded": "10TB",
"ratio": "5.5",
"seedingPoints": "1000000",
"privilege": "十个邀请名额;发送邀请"
}],
"searchEntryConfig": {
"area": [
{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"appendQueryString": "&search_area=1"
}
],
"fieldSelector": {
"progress": {
"selector": [ ".progress:eq(0) > div" ],
"filters": [ "query.attr('style')||''", "query.match(/width:([ \\d.]+)%/)", "(query && query.length>=2)?query[1]:null" ]
},
"status": {
"selector": [ ".progress:eq(0) > div" ],
"filters": [ "query.attr('class')", "query=='progress_seeding'?2:(query=='progress_completed'?255:(query=='progress_no_downloading'?3:1))" ]
}
}
},
"selectors": {
"userExtendInfo": {
"merge": true,
"fields": {
"seeding": {
"selector": [ "span.medium img.arrowup" ],
"filters": [ "$(query[0].nextSibling).text().trim().replace(/,/g,'')" ]
},
"seedingSize": {
"selector": [ "td.rowhead:contains('当前做种') + td", "td.rowhead:contains('目前做種') + td", "td.rowhead:contains('Current Seeding') + td" ],
"filters": [ "query.text().replace(/.*共计/g,'').replace(')','')", "query.sizeToNumber()" ]
}
}
}
}
}
================================================
FILE: resource/sites/pt.eastgame.org/config.json
================================================
{
"name": "TLFBits",
"timezoneOffset": "+0800",
"schema": "NexusPHP",
"url": "https://pt.eastgame.org/",
"description": "水管虽小,坚持则大!宛如TLF,虽弱却奢华",
"icon": "https://pt.eastgame.org/favicon.ico",
"tags": ["影视"],
"host": "pt.eastgame.org",
"collaborator": "waldens",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.5",
"privilege": "可以查看NFO文档;可以请求续种; 查看种子结构; 可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "2.55",
"privilege": "可以查看用户的种子历史记录,如下载种子的历史记录(只有用户的隐私等级没有设为’强‘时才生效); 可以查看高级会员区。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "3.05",
"privilege": "可以查看排行榜;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "4.55",
"privilege": "可以发送邀请;查看一般日志,不能查看机密日志; Insane User及以上等级的账号如果在封存后将永远保留。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "5.05",
"privilege": "得到一个邀请名额;可以查看其它用户的评论、帖子历史(如果用户隐私等级未设置为'强'); Veteran User及以上等级的账号将永远保留。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "6.55",
"privilege": "得到三个邀请名额;可以更新过期的外部信息。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "7.05",
"privilege": "得到五个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "8.55",
"privilege": "得到十个邀请名额。"
}
]
}
================================================
FILE: resource/sites/pt.hd4fans.org/config.json
================================================
{
"name": "HD4FANS",
"timezoneOffset": "+0800",
"schema": "NexusPHP",
"url": "https://pt.hd4fans.org",
"icon": "https://pt.hd4fans.org/favicon.ico",
"tags": [
"影视",
"兽组"
],
"host": "pt.hd4fans.org",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"privilege": "得到一个邀请名额;可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},{
"level": "4",
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"privilege": "可以查看普通日志。"
},{
"level": "5",
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},{
"level": "6",
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
},{
"level": "7",
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"privilege": "得到五个邀请名额。"
},{
"level": "8",
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"privilege": "得到十个邀请名额。"
}],
"collaborator": ["lilungpo", "tongyifan"],
"searchEntry": [
{
"name": "全站",
"enabled": true
},
{
"queryString": "cat401=1",
"name": "电影",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "纪录片",
"enabled": false
},
{
"queryString": "cat405=1",
"name": "动漫",
"enabled": false
},
{
"queryString": "cat402=1",
"name": "电视剧",
"enabled": false
},
{
"queryString": "cat403=1",
"name": "综艺",
"enabled": false
},
{
"queryString": "cat406=1",
"name": "MV",
"enabled": false
},
{
"queryString": "cat407=1",
"name": "体育",
"enabled": false
},
{
"queryString": "cat409=1",
"name": "其它",
"enabled": false
},
{
"queryString": "cat408=1",
"name": "音轨",
"enabled": false
}
],
"categories": [
{
"entry": "*",
"result": "&cat$id$=1",
"category": [
{
"id": 401,
"name": "电影"
},
{
"id": 404,
"name": "纪录片"
},
{
"id": 405,
"name": "动漫"
},
{
"id": 402,
"name": "电视剧"
},
{
"id": 403,
"name": "综艺"
},
{
"id": 406,
"name": "MV"
},
{
"id": 407,
"name": "体育"
},
{
"id": 409,
"name": "其它"
},
{
"id": 408,
"name": "音轨"
}
]
}
],
"torrentTagSelectors": [
{
"name": "Free",
"selector": "img.pro_free, .free_bg, font.free"
},
{
"name": "2xFree",
"selector": "img.pro_free2up, font.twoupfree"
},
{
"name": "2xUp",
"selector": "img.pro_2up, .twoup_bg, font.twoup"
},
{
"name": "2x50%",
"selector": "img.pro_50pctdown2up, .twouphalfdown_bg, font.twouphalfdown"
},
{
"name": "30%",
"selector": "img.pro_30pctdown, .thirtypercentdown_bg, font.thirtypercent"
},
{
"name": "50%",
"selector": "img.pro_50pctdown, .halfdown_bg, font.halfdown"
}
],
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": [
"div[class='progressarea'] > div"
],
"filters": [
"query.attr('style').match(/(\\d+(?:\\.\\d+)?)%/)[1]"
]
}
}
}
}
================================================
FILE: resource/sites/pt.hdbd.us/config.json
================================================
{
"name": "伊甸园",
"timezoneOffset": "+0800",
"description": "这里是伊甸园 让我们赤裸坦诚相见",
"url": "https://pt.hdbd.us",
"icon": "https://pt.hdbd.us/favicon.ico",
"tags": ["综合", "XXX"],
"schema": "NexusPHP",
"host": "pt.hdbd.us",
"searchEntryConfig": {
"merge":true,
"fieldSelector": {
"progress": {
"selector": ["div[class*='probar_a']"],
"filters": ["query.attr('title')?(query.attr('title')=='下载过,已完成'?100:query.children().attr('style').match(/width:([ \\d.]+)%/)[1]):null"]
},
"status": {
"selector": ["div[class*='probar_a']"],
"filters": ["query.attr('title')||''", "query=='下载过,已完成'?255:(query.indexOf('下载过,未完成')!=-1?3:(query.indexOf('正在做种')!=-1?2:1))"]
}
}
}
}
================================================
FILE: resource/sites/pt.hdpost.top/config.json
================================================
{
"name": "HDPOST",
"timezoneOffset": "+0800",
"description": "HDPOST",
"url": "https://pt.hdpost.top/",
"icon": "https://pt.hdpost.top/favicon.ico",
"tags": [
"电影",
"电视剧"
],
"schema": "UNIT3D",
"host": "pt.hdpost.top"
}
================================================
FILE: resource/sites/pt.hdupt.com/config.json
================================================
{
"name": "HDU",
"timezoneOffset": "+0800",
"description": "HDU",
"url": "https://pt.hdupt.com/",
"icon": "https://pt.hdupt.com/favicon.ico",
"tags": [
"影视",
"综合"
],
"schema": "NexusPHP",
"host": "pt.hdupt.com",
"searchEntryConfig": {
"merge": true,
"fieldSelector": {
"progress": {
"selector": ["td[class='embedded'][style*='color: blue;font-weight: bold'],td[class='embedded'] img[src*='zuozhong.gif']"],
"filters": ["query.attr('src')?100:(query.text()?query.text():null)"]
},
"status": {
"selector": ["td[class='embedded'][style*='color: blue;font-weight: bold'],td[class='embedded'] img[src*='zuozhong.gif']"],
"filters": ["query.attr('src')?2:(query.text()=='100%'?255:3)"]
}
}
},
"searchEntry": [{
"name": "全站",
"enabled": true
},
{
"queryString": "cat401=1",
"name": "Movies/电影",
"enabled": false
},
{
"queryString": "cat402=1",
"name": "TV Series/电视剧",
"enabled": false
},
{
"queryString": "cat403=1",
"name": "TV Shows/综艺",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "Documentaries/纪录片",
"enabled": false
},
{
"queryString": "cat405=1",
"name": "Animations/动画",
"enabled": false
},
{
"queryString": "cat406=1",
"name": "Music Videos/音乐 MV",
"enabled": false
},
{
"queryString": "cat407=1",
"name": "Sports/体育",
"enabled": false
},
{
"queryString": "cat408=1",
"name": "HQ Audio/无损音乐",
"enabled": false
},
{
"queryString": "cat411=1",
"name": "Misc/其他",
"enabled": false
},
{
"queryString": "cat410=1",
"name": "Games/游戏",
"enabled": false
}
],
"categories": [{
"entry": "*",
"result": "&cat$id$=1",
"category": [{
"id": 401,
"name": "Movies/电影"
},
{
"id": 402,
"name": "TV Series/电视剧"
},
{
"id": 403,
"name": "TV Shows/综艺"
},
{
"id": 404,
"name": "Documentaries/纪录片"
},
{
"id": 405,
"name": "Animations/动画"
},
{
"id": 406,
"name": "Music Videos/音乐 MV"
},
{
"id": 407,
"name": "Sports/体育"
},
{
"id": 408,
"name": "HQ Audio/无损音乐"
},
{
"id": 411,
"name": "Misc/其他"
},
{
"id": 410,
"name": "Games/游戏"
}
]
}],
"selectors": {
"userExtendInfo": {
"merge": true,
"fields": {
"bonus": {
"selector": ["td.rowhead:contains('魔力值') + td"],
"filters": ["query.is(\":contains('魔力值:')\")?query.text().replace(/,/g,'').match(/魔力值.+?([\\d.]+)/)[1]:query.text().replace(/,/g,'')", "parseFloat(query)"]
}
}
}
}
}
================================================
FILE: resource/sites/pt.keepfrds.com/config.json
================================================
{
"name": "PT@KEEPFRDS",
"timezoneOffset": "+0000",
"url": "https://pt.keepfrds.com/",
"icon": "https://pt.keepfrds.com/static/favicon-64x64.png",
"tags": [
"影视",
"综合"
],
"schema": "NexusPHP",
"host": "pt.keepfrds.com",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "5",
"downloaded": "50GB",
"ratio": "1.0",
"bonus": "3200",
"privilege": "请求续种;查看排行榜;查看其它用户的种子历史;查看IMDB/Douban信息;使用魔力值"
},{
"level": "2",
"name": "Elite User",
"interval": "10",
"downloaded": "150GB",
"ratio": "1.5",
"bonus": "19200",
"privilege": "封存账号后不会被删除;查看排行榜,IMDB/Douban Top榜单和论坛的邀请区"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.0",
"bonus": "76800",
"privilege": "在做种/下载的时候选择匿名模式;使用自动合集功能"
},{
"level": "4",
"name": "Insane User",
"interval": "30",
"downloaded": "500GB",
"ratio": "2.5",
"bonus": "256000",
"privilege": "查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.5",
"bonus": "640000",
"privilege": "查看其它用户的评论、帖子历史;永远保留账号"
},{
"level": "6",
"name": "Extreme User",
"interval": "90",
"downloaded": "2TB",
"ratio": "4.0",
"bonus": "1280000",
"privilege": "上传量按照等级对应的限速计算"
},{
"level": "7",
"name": "Ultimate User",
"interval": "120",
"downloaded": "3TB",
"ratio": "4.5",
"bonus": "1920000",
"privilege": "上传速度限制提升为普通用户的二倍"
},{
"level": "8",
"name": "Nexus Master",
"interval": "150",
"downloaded": "4TB",
"ratio": "5.0",
"bonus": "2560000",
"privilege": "除了数据考核要求,其他权利等同于VIP,包括没有上传速度的限制"
}],
"searchEntryConfig": {
"merge": true,
"fieldSelector": {
"progress": {
"selector": ["img[src='/static/pic/newpic/2s_dl.gif']", "img[src='/static/pic/newpic/2s_up.gif'], img[src='/static/pic/newpic/2s_dled.gif']", ""],
"switchFilters": [
["query.parent().parent().next().attr('style').split(';')[0].replace('width: ','').replace('px','')/3"],
["100"],
["null"]
]
},
"status": {
"selector": ["img[src='/static/pic/newpic/2s_dl.gif']", "img[src='/static/pic/newpic/2s_up.gif']", "img[src='/static/pic/newpic/2s_dled.gif']"],
"switchFilters": [
["1"],
["2"],
["255"]
]
}
}
},
"searchEntry": [{
"name": "全站",
"enabled": true
},
{
"queryString": "cat401=1",
"name": "Movies",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "Documentaries",
"enabled": false
},
{
"queryString": "cat405=1",
"name": "Animations",
"enabled": false
},
{
"queryString": "cat402=1",
"name": "TV Series",
"enabled": false
},
{
"queryString": "cat403=1",
"name": "TV Shows",
"enabled": false
},
{
"queryString": "cat406=1",
"name": "Music Videos",
"enabled": false
},
{
"queryString": "cat407=1",
"name": "Sports",
"enabled": false
},
{
"queryString": "cat409=1",
"name": "Misc",
"enabled": false
},
{
"queryString": "cat408=1",
"name": "HQ Audio",
"enabled": false
}
],
"categories": [{
"entry": "*",
"result": "&cat$id$=1",
"category": [{
"id": 401,
"name": "Movies"
},
{
"id": 404,
"name": "Documentaries"
},
{
"id": 405,
"name": "Animations"
},
{
"id": 402,
"name": "TV Series"
},
{
"id": 403,
"name": "TV Shows"
},
{
"id": 406,
"name": "Music Videos"
},
{
"id": 407,
"name": "Sports"
},
{
"id": 409,
"name": "Misc"
},
{
"id": 408,
"name": "HQ Audio"
}
]
}],
"selectors": {
"userBaseInfo": {
"merge": true,
"fields": {
"messageCount": {
"selector": ["a[href*='messages.php'] b span[style*='color: red']"]
},
"seeding": {
"selector": ["img[alt='Torrents seeding']"],
"filters": ["$(query[0].nextSibling).text().trim()"]
}
}
},
"userExtendInfo": {
"merge": true,
"fields": {
"bonus": {
"selector": ["td.rowhead:contains('魔力值') + td, td.rowhead:contains('Karma Points') + td"],
"filters": ["query.text().replace(/,/g,'').match(/魔力值:.+?([\\d.]+)/)[1]", "parseFloat(query)"]
},
"bonusPerHour": {
"selector": ["td.rowhead:contains('魔力值') + td, td.rowhead:contains('Karma Points') + td"],
"filters": ["query.text().replace(/,/g,'').match(/[\\d.]+/g)",
"query.length == 5 ? parseFloat(query[2]) + parseFloat(query[4]) : parseFloat(query[2])"]
},
"seedingSize": {
"selector": ["td.rowhead:contains('当前做种') + td, td.rowhead:contains('Current Seeding') + td, td.rowhead:contains('目前做種') + td"],
"filters": ["query.text().trim().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
}
}
},
"/details.php": {
"merge": true,
"fields": {
"downloadURL": {
"selector": ["input#download_link"],
"filters": ["query.val()"]
}
}
}
},
"mergeSchemaTagSelectors": true,
"torrentTagSelectors": [{
"name": "⛔️",
"selector": "td.embedded b > font.recommended:contains('禁转')"
},{
"name": "Neutral",
"selector": "img.pro_nl",
"color": "purple"
}]
}
================================================
FILE: resource/sites/pt.newworld.plus/config.json
================================================
{
"name": "ihdbits",
"schema": "NexusPHP",
"url": "https://pt.newworld.plus/",
"description": "The Ultimate File Sharing Experience",
"icon": "https://pt.newworld.plus/favicon.ico",
"tags": [
"影视"
],
"host": "pt.newworld.plus",
"collaborator": "koal",
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["b:first"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/pt.sjtu.edu.cn/config.json
================================================
{
"name": "葡萄",
"timezoneOffset": "+0800",
"description": "Free Share, Join us",
"url": "https://pt.sjtu.edu.cn/",
"icon": "https://pt.sjtu.edu.cn/favicon.ico",
"tags": [
"教育网",
"影视",
"综合"
],
"schema": "NexusPHP",
"host": "pt.sjtu.edu.cn",
"collaborator": ["Rhilip","Yincircle"],
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"privilege": "可以查看NFO文档; 可以查看用户列表; 可以请求续种; 可以在求种补种区发主题帖;可以查看友站邀请专区;可以查看排行榜; 可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以在魔力值系统购买更多邀请名额.可以同时下载5个种子."
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"privilege": "Elite User及以上用户Park后不会被删除帐号;可以直接上传种子.可以同时下载8个种子."
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"privilege": "得到一个邀请名额; 可以发送邀请; 可以在做种/下载/上传的时候选择匿名模式.可以同时下载10个种子."
},{
"level": "4",
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"privilege": "得到一个邀请名额; 可以查看普通日志.同时下载种子线程无限制."
},{
"level": "5",
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"privilege": "可以查看其它用户的评论、帖子历史;Veteran User及以上用户会永远保留账号."
},{
"level": "6",
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"privilege": "得到一个邀请名额; 可以更新过期的外部信息."
},{
"level": "7",
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"privilege": "可以查看种子文件结构."
},{
"level": "8",
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"privilege": "得到一个邀请名额."
}],
"searchEntryConfig": {
"merge": true,
"fieldSelector": {
"progress": {
"selector": ["td.snatched_no_yes, td.snatched_yes_yes", "td.snatched_no_no, td.snatched_yes_no", ""],
"switchFilters": [
["100"],
["0"],
["null"]
]
},
"status": {
"selector": ["td.snatched_no_yes, td.snatched_yes_yes", "td.snatched_no_no, td.snatched_yes_no"],
"switchFilters": [
["2"],
["3"]
]
}
}
},
"categories": [{
"entry": "*",
"result": "cat$id$=1",
"category": [{
"id": 401,
"name": "华语电影"
},
{
"id": 402,
"name": "欧美电影"
},
{
"id": 403,
"name": "亚洲电影"
},
{
"id": 406,
"name": "纪录片"
},
{
"id": 407,
"name": "港台电视剧"
},
{
"id": 408,
"name": "亚洲电视剧"
},
{
"id": 409,
"name": "大陆电视剧"
},
{
"id": 410,
"name": "欧美电视剧"
},
{
"id": 411,
"name": "大陆综艺节目"
},
{
"id": 412,
"name": "港台综艺节目"
},
{
"id": 413,
"name": "欧美综艺节目"
},
{
"id": 414,
"name": "日韩综艺节目"
},
{
"id": 420,
"name": "华语音乐"
},
{
"id": 421,
"name": "日韩音乐"
},
{
"id": 422,
"name": "欧美音乐"
},
{
"id": 423,
"name": "原声音乐"
},
{
"id": 425,
"name": "古典音乐"
},
{
"id": 426,
"name": "mp3合辑"
},
{
"id": 427,
"name": "Music Videos"
},
{
"id": 429,
"name": "游戏"
},
{
"id": 431,
"name": "动漫"
},
{
"id": 432,
"name": "体育"
},
{
"id": 434,
"name": "软件"
},
{
"id": 435,
"name": "学习"
},
{
"id": 440,
"name": "mac"
},
{
"id": 451,
"name": "校园原创"
},
{
"id": 450,
"name": "其他"
}
]
}],
"selectors": {
"userSeedingTorrents": {
"merge": true,
"page": "/viewusertorrents.php?id=$user.id$&show=seeding",
"fields": {
"seedingSize": {
"selector": ["tr:not(:eq(0))"],
"filters": ["jQuery.map(query.find('td.rowfollow:eq(1)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
}
}
}
}
}
================================================
FILE: resource/sites/pt.soulvoice.club/config.json
================================================
{
"name": "聆音Club",
"timezoneOffset": "+0800",
"schema": "NexusPHP",
"url": "https://pt.soulvoice.club/",
"description": "致力于建设一个有声资源,电子书为主,学习资料,影视资源为辅的PT分享站。",
"tags": [
"综合",
"电子书",
"有声书"
],
"host": "pt.soulvoice.club",
"collaborator": [
"Gold John King",
"枕头啊枕头",
"Yincircle",
"yum",
"yiyule"
],
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"privilege": "可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"privilege": "可以在做种/下载/发布的时候选择匿名模式。"
},{
"level": "4",
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"privilege": "可以查看普通日志。"
},{
"level": "5",
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"privilege": "可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},{
"level": "6",
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
},{
"level": "7",
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"privilege": ""
},{
"level": "8",
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"privilege": ""
}],
"plugins": [{
"name": "阅听专区",
"pages": ["/special.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/NexusPHP/torrents.js"]
}],
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": [
"> td:eq(8)"
],
"filters": [
"query.text()=='--'?null:parseFloat(query.text())"
]
},
"status": {
"selector": [
"> td:eq(8)"
],
"filters": [
"query.text()==='--'?null:(parseFloat(query.text())==100?255:3)"
]
}
}
},
"searchEntry": [
{
"name": "种子",
"enabled": true
},
{
"entry": "special.php?search=$key$¬newword=1",
"name": "阅听专区",
"enabled": false
}
],
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["b:first"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/pt.xauat6.edu.cn/config.json
================================================
{
"name": "溪涧草堂PT",
"timezoneOffset": "+0800",
"description": "以热播电影,热播剧集,热播综艺为主,纪录,动漫,GTV,资料等资源为辅,多方面地为用户提供丰富的资源下载",
"url": "http://pt.xauat6.edu.cn/",
"icon": "http://pt.xauat6.edu.cn/favicon.ico",
"tags": [
"教育网",
"影视",
"综合"
],
"schema": "NexusPHP",
"host": "pt.xauat6.edu.cn",
"collaborator": "Rhilip",
"searchEntry": [{
"name": "全站",
"enabled": true
},
{
"queryString": "cat401=1",
"name": "电影",
"enabled": false
},
{
"queryString": "cat402=1",
"name": "剧集",
"enabled": false
},
{
"queryString": "cat403=1",
"name": "纪录",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "资料",
"enabled": false
},
{
"queryString": "cat405=1",
"name": "综艺",
"enabled": false
},
{
"queryString": "cat406=1",
"name": "MV",
"enabled": false
},
{
"queryString": "cat407=1",
"name": "音乐",
"enabled": false
},
{
"queryString": "cat408=1",
"name": "动漫",
"enabled": false
},
{
"queryString": "cat409=1",
"name": "软件",
"enabled": false
},
{
"queryString": "cat410=1",
"name": "体育",
"enabled": false
},
{
"queryString": "cat421=1",
"name": "游戏",
"enabled": false
},
{
"queryString": "cat424=1",
"name": "游戏视频",
"enabled": false
},
{
"queryString": "cat422=1",
"name": "其他",
"enabled": false
}
],
"categories": [{
"entry": "*",
"result": "&cat$id$=1",
"category": [{
"id": 401,
"name": "电影"
},
{
"id": 402,
"name": "剧集"
},
{
"id": 403,
"name": "纪录"
},
{
"id": 404,
"name": "资料"
},
{
"id": 405,
"name": "综艺"
},
{
"id": 406,
"name": "MV"
},
{
"id": 407,
"name": "音乐"
},
{
"id": 408,
"name": "动漫"
},
{
"id": 409,
"name": "软件"
},
{
"id": 410,
"name": "体育"
},
{
"id": 421,
"name": "游戏"
},
{
"id": 424,
"name": "游戏视频"
},
{
"id": 422,
"name": "其他"
}
]
}]
}
================================================
FILE: resource/sites/pt.zhixing.bjtu.edu.cn/config.json
================================================
{
"name": "知行PT",
"description": "北京交通大学知行pt",
"url": "http://pt.zhixing.bjtu.edu.cn/",
"icon": "http://pt.zhixing.bjtu.edu.cn/favicon.ico",
"tags": [
"教育网",
"综合",
"影视"
],
"plugins": [{
"name": "种子详情页面",
"pages": ["/torrents/"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["/search/"],
"scripts": ["/schemas/NexusPHP/common.js", "torrents.js"]
}],
"schema": "Common",
"host": "pt.zhixing.bjtu.edu.cn",
"collaborator": "wanicca",
"searchEntryConfig": {
"page": "/search/x$key$",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "table.torrenttable:last",
"fieldIndex": {
"title": 1,
"url": 1,
"link":1,
"size":3,
"seeders": 7,
"leechers": 8,
"completed": 9,
"author": 10,
"category": 0,
"time": 6
}
},
"searchEntry": [
{
"name": "全部",
"enabled": true
}
],
"torrentTagSelectors": [
{
"name": "Free",
"selector": "img[src^='/static/images/btn_free.gif']"
},
{
"name": "50%",
"selector": "img[src^='/static/images/btn_50p.gif']"
},
{
"name": "30%",
"selector": "img[src^='/static/images/btn_30p.gif']"
}
],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"id": {
"selector": "strong.vwmy > a[href*='/user/']:first",
"attribute": "href",
"filters": [
"query ? query.split('/')[2]:''"
]
},
"name": {
"selector": "strong.vwmy > a[href*='/user/']:first"
},
"isLogged": {
"selector": [
"a[href*='/user/logout']"
],
"filters": [
"query.length>0"
]
}
}
},
"userExtendInfo": {
"page": "/user/$user.id$/",
"fields": {
"uploaded": {
"selector": [
"p:contains('上传流量:')"
],
"filters": [
"query.text().replace(/上传流量: /g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
]
},
"downloaded": {
"selector": [
"p:contains('下载流量:')"
],
"filters": [
"query.text().replace(/下载流量: /g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
]
},
"ratio": {
"selector": "p:contains('共享率')",
"filters": [
"parseFloat(query.text().replace(/共享率: | (下载-虚拟下载小于20G则共享率为0)/,'')"
]
},
"levelName": {
"selector": [
"p:contains('用户组:')"
],
"filters": [
"query.text().match(/用户组:([^ ]+)/)",
"(query && query.length>=2)?(query[1]):''"
]
},
"bonus": {
"selector": [
"p:contains('保种积分')"
],
"filters": [
"query.text().replace(/保种积分: /g,'').match(/([\\d.]+)/)",
"(query && query.length>=2)?query[1]:''"
]
},
"joinTime": {
"selector": [
"p:contains('注册时间:')"
],
"filters": [
"query.text().split(':')[1]",
"dateTime(query).isValid()?dateTime(query).valueOf():query"
]
},
"seeding": {
"selector": [
"p:contains('当前保种数量:')"
],
"filters": [
"query.text().match(/当前保种数量:([\\d.]+)/)",
"(query && query.length>=1)?query[1]:''"
]
},
"seedingSize": {
"selector": [
"p:contains('当前保种容量:')"
],
"filters": [
"query.text().replace(/当前保种容量:/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
]
}
}
}
}
}
================================================
FILE: resource/sites/pt.zhixing.bjtu.edu.cn/details.js
================================================
(function ($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
if (this.getDownloadURL()) {
this.initDetailButtons();
}
}
/**
* 获取下载链接
*/
getDownloadURL() {
let query = $("a[href*='/download/']");
let url = "";
if (query.length > 0) {
url = query.attr("href");
}
if (!url) {
return "";
}
if (url.substr(0, 2) === '//') {
url = `${location.protocol}${url}`;
} else if (url.substr(0, 1) === "/") {
url = `${location.origin}${url}`;
} else if (url.substr(0, 4) !== "http") {
url = `${location.origin}/${url}`;
}
return url;
}
/**
* 获取当前种子标题
*/
getTitle() {
let title = $("div.torrent-title").text();
let datas = /\"(.*?)\"/.exec(title);
if (datas && datas.length > 1) {
return datas[1] || title;
}
return title;
}
};
(new App()).init();
})(jQuery, window);
================================================
FILE: resource/sites/pt.zhixing.bjtu.edu.cn/getSearchResult.js
================================================
/**
* 通用搜索解析脚本
*/
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
// 判断是否已登录
if (
options.entry.loggedRegex &&
!new RegExp(options.entry.loggedRegex, "").test(options.responseText)
) {
// 需要登录后再搜索
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
this.haveData = true;
this.site = options.site;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let selector = options.resultSelector;
let dataRowSelector = options.entry.dataRowSelector || "> tbody > tr";
selector = selector.replace(dataRowSelector, "");
// 获取数据表格
let table = options.page.find(selector);
// 获取种子列表行
let rows = table.find(dataRowSelector);
if (rows.length == 0) {
// 没有定位到种子列表,或没有相关的种子
options.status = ESearchResultParseStatus.torrentTableIsEmpty;
return [];
}
let cats = options.page.find("div#tabContainer")
let results = [];
let beginRowIndex = options.entry.firstDataRowIndex || 0;
// 用于定位每个字段所列的位置
let fieldIndex = options.entry.fieldIndex || {
// 发布时间
time: -1,
// 大小
size: -1,
// 上传数量
seeders: -1,
// 下载数量
leechers: -1,
// 完成数量
completed: -1,
// 评论数量
comments: -1,
// 发布人
author: -1,
// 分类
category: -1
};
try {
// 遍历数据行
for (let index = beginRowIndex; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
// let title = this.getTitle(row, cells, fieldIndex);
let title_entry = cells.eq(fieldIndex['title']).find("a[href^='/torrents/']")
let title = title_entry.text()
// 没有获取标题时,继续下一个
if (!title) {
continue;
}
// let link = this.getFieldValue(row, cells, fieldIndex, "link");
let link = title_entry.attr('href')
// 获取下载链接
// let url = this.getFieldValue(row, cells, fieldIndex, "url");
let url = link+"download/"
if (!url || !link) {
continue;
}
let time = cells.eq(fieldIndex['time']).text()
if(time.indexOf('-')==2){
var d = new Date()
time = d.getFullYear().toString() + '-' + time
}
let data = {
title: title,
subTitle: this.getFieldValue(row, cells, fieldIndex, "subTitle"),
link: this.getFullURL(link),
url: this.getFullURL(url),
size: this.getFieldValue(row, cells, fieldIndex, "size") || 0,
// time: this.getFieldValue(row, cells, fieldIndex, "time"),
time: time,
author: this.getFieldValue(row, cells, fieldIndex, "author") || "", //尚未解决
seeders: this.getFieldValue(row, cells, fieldIndex, "seeders") || 0,
leechers:
this.getFieldValue(row, cells, fieldIndex, "leechers") || 0,
completed:
this.getFieldValue(row, cells, fieldIndex, "completed") || 0,
comments:
this.getFieldValue(row, cells, fieldIndex, "comments") || 0,
site: this.site,
tags: Searcher.getRowTags(this.site, row),
entryName: options.entry.name,
// category: this.getFieldValue(row, cells, fieldIndex, "category"),
category:cats.find("a[href='/search/"+cells.eq(fieldIndex['category']).find(">img").attr('src').match(/catpic\/([^\.]+).png/)[1]+"/']").text(),
progress: this.getFieldValue(row, cells, fieldIndex, "progress"),
status: this.getFieldValue(row, cells, fieldIndex, "status")
};
results.push(data);
}
} catch (error) {
// 获取种子信息出错
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack;
}
// 没有搜索到相关的种子
if (results.length == 0 && !options.errorMsg) {
options.status = ESearchResultParseStatus.noTorrents;
}
return results;
}
/**
* 获取指定字段内容
* @param {*} row
* @param {*} cells
* @param {*} fieldIndex
* @param {*} fieldName
*/
getFieldValue(row, cells, fieldIndex, fieldName, returnCell) {
let parent = row;
let cell = null;
if (
cells &&
fieldIndex &&
fieldIndex[fieldName] !== undefined &&
fieldIndex[fieldName] !== -1
) {
cell = cells.eq(fieldIndex[fieldName]);
parent = cell || row;
}
let result = Searcher.getFieldValue(this.site, parent, fieldName);
if (!result && cell) {
if (returnCell) {
return cell;
}
result = cell.text();
}
return result;
}
/**
* 获取完整的URL地址
* @param {string} url
*/
getFullURL(url) {
let URL = PTServiceFilters.parseURL(this.site.url);
if (url.substr(0, 2) === "//") {
url = `${URL.protocol}${url}`;
} else if (url.substr(0, 1) === "/") {
url = `${URL.origin}${url}`;
} else if (url.substr(0, 4) !== "http") {
url = `${URL.origin}/${url}`;
}
return url;
}
/**
* 获取标题
*/
getTitle(row, cells, fieldIndex) {
let title = this.getFieldValue(row, cells, fieldIndex, "title", true);
if (!title) {
return "";
}
if (typeof title === "string") {
return title;
}
// 对title进行处理,防止出现cf的email protect
let cfemail = title.find("span.__cf_email__");
if (cfemail.length > 0) {
cfemail.each((index, el) => {
$(el).replaceWith(Searcher.cfDecodeEmail($(el).data("cfemail")));
});
}
return title.text();
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/sites/pt.zhixing.bjtu.edu.cn/torrents.js
================================================
(function($) {
console.log("this is torrent.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $("a[href^='/torrents/']").toArray();
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (links.length == 0) {
return this.t("getDownloadURLsFailed"); //"获取下载链接失败,未能正确定位到链接";
}
let urls = $.map(links, item => {
let url =
$(item).attr("href")+"download/" ;
if (url) {
if (url.substr(0, 1) === "/") {
url = url.substr(1);
}
url = siteURL + url;
}
return url;
});
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$(".torrents").find(
"td:contains('MB'),td:contains('GB'),td:contains('TB')"
)
);
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/ptchina.org/config.json
================================================
{
"name": "PTChina",
"timezoneOffset": "+0800",
"description": "PTChina",
"url": "https://ptchina.org/",
"icon": "https://ptchina.org/favicon.ico",
"tags": [],
"schema": "NexusPHP",
"host": "ptchina.org",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"seedingPoints": "40000",
"privilege": "得到一个邀请名额;可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"seedingPoints": "80000",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"seedingPoints": "150000",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"seedingPoints": "250000",
"privilege": "可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"seedingPoints": "400000",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"seedingPoints": "600000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"seedingPoints": "800000",
"privilege": "得到五个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"seedingPoints": "1000000",
"privilege": "得到十个邀请名额。"
}
],
"collaborator": ["koal", "zhuweitung"],
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
},
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(0) > div:last"],
"filters": ["query ? parseFloat(query.attr('title').match(/[\\d.]+/)) : null"]
},
"status": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(0) > div:last"],
"filters": [
"query ? query.attr('title') : ''",
"query.indexOf('seeding') != -1 ? 2 : query.indexOf('leeching') != -1 ? 1 : query.indexOf('100%') != -1 ? 255 : 3"
]
}
}
}
}
================================================
FILE: resource/sites/pterclub.com/config.json
================================================
{
"name": "PTer",
"timezoneOffset": "+0800",
"description": "PT之友俱乐部",
"url": "https://pterclub.com/",
"icon": "https://pterclub.com/favicon.ico",
"tags": ["影视", "综合"],
"schema": "NexusPHP",
"host": "pterclub.com",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "5",
"downloaded": "50GB",
"ratio": "1.05",
"privilege": "直接发布种子;查看邀请区;请求续种;上传字幕和删除自己上传的字幕"
},{
"level": "2",
"name": "Elite User",
"interval": "10",
"downloaded": "120GB",
"ratio": "1.55",
"privilege": "可以查看排行榜"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"privilege": "无"
},{
"level": "4",
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"privilege": "查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "30",
"downloaded": "750GB",
"ratio": "3.05",
"privilege": "用户封存账号后不会被封禁"
},{
"level": "6",
"name": "Extreme User",
"interval": "35",
"downloaded": "1024GB",
"ratio": "3.55",
"privilege": "无"
},{
"level": "7",
"name": "Ultimate User",
"interval": "40",
"downloaded": "1536GB",
"ratio": "4.05",
"privilege": "无"
},{
"level": "8",
"name": "Nexus Master",
"interval": "45",
"downloaded": "3072GB",
"ratio": "4.55",
"privilege": "永远保留账号"
}],
"formerHosts": [
"pter.club"
],
"searchEntryConfig": {
"fieldSelector": {
"title": {
"selector": ["a[href*='details'][href*='php?id=']:first"],
"filters": ["query"]
},
"subTitle": {
"selector": ["div>span:eq(0)"],
"filters": ["query.text().trim()"]
},
"imdbId": {
"selector": ["a span[data-imdbid]:first"],
"attribute": "data-imdbid",
"filters": ["this.formatIMDbId(query)"]
},
"progress": {
"selector": [".progbargreen", ".progbarred + .progbarrest", ".progbarred", ".progbarrest", ""],
"switchFilters": [
["100"],
["query.prev().attr('style').replace('width: ','').replace('%;','')"],
["100"],
["0"],
["null"]
]
},
"status": {
"selector": [".progbargreen", ".progbarred + .progbarrest", ".progbarred", ".progbarrest"],
"switchFilters": [
["2"],
["3"],
["255"],
["3"]
]
}
}
},
"searchEntry": [{
"name": "综合",
"enabled": true
}, {
"entry": "/music.php?search=$key$¬newword=1",
"name": "音乐",
"enabled": true
}],
"selectors": {
"userExtendInfo": {
"merge": true,
"fields": {
"bonus": {
"selector": ["td.rowhead:contains('猫粮') + td, td.rowhead:contains('Karma Points') + td, td.rowhead:contains('貓糧') + td"],
"filters": ["query.text().replace(/,/g,'')", "parseFloat(query)"]
},
"seeding": {
"selector": ["a[href*='getusertorrentlist.php'][href*='seeding']"],
"filters": ["query ? parseInt(query.text().replace(/,/g,'')) : 0"]
},
"seedingSize": {
"selector": ["td.rowhead:contains('做种大小') + td, td.rowhead:contains('Seeding Size') + td, td.rowhead:contains('做種大小') + td"],
"filters": ["query.text().trim().sizeToNumber()"]
}
}
},
"userSeedingTorrents": {
"prerequisites": "!user.seeding",
"page": "/getusertorrentlist.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["tr:not(:eq(0))"],
"filters": ["query.find('td.rowfollow:eq(1)').length"]
}
}
}
},
"plugins": [
{
"name": "保种和官方列表",
"pages": ["/reseed.php", "/officialgroup.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/NexusPHP/torrents.js"]
},{
"name": "游戏种子详情页面",
"pages": ["/detailsgame.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/details.js"]
}
],
"mergeSchemaTagSelectors": true,
"torrentTagSelectors": [{
"name": "⛔️",
"selector": "a[href*='torrents.php?tag_exclusive=yes']"
}]
}
================================================
FILE: resource/sites/pthome.net/config.json
================================================
{
"name": "PTHome",
"timezoneOffset": "+0800",
"schema": "NexusPHP",
"url": "https://pthome.net/",
"description": "只为成为您的家,快乐下载,分享至美!",
"icon": "https://pthome.net/favicon.ico",
"tags": ["综合", "影视", "游戏"],
"host": "pthome.net",
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["td:not(.rowfollow):not(.colhead):not(.embedded)"],
"filters": ["query.text()=='-'?null:query.text()"]
},
"status": {
"selector": [".torrents-progress"],
"switchFilters": [
["query.attr('style').indexOf('100%')!=-1?255:3"]
]
}
}
},
"collaborator": ["waldens", "cnsunyour"],
"levelRequirements": [{
"level": "1",
"name": "钢铁(Power User)",
"interval": "4",
"downloaded": "200GB",
"ratio": "1.0",
"seedingPoints": "20000",
"privilege": "可以查看NFO文档;可以查看用户列表;可以请求续种; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。可以浏览论坛邀请专版。"
},{
"level": "2",
"name": "铝锭(Elite User)",
"interval": "8",
"downloaded": "350GB",
"ratio": "1.1",
"seedingPoints": "50000",
"privilege": "Elite User及以上用户封存账号后不会被删除"
},{
"level": "3",
"name": "锌锭(Crazy User)",
"interval": "15",
"downloaded": "500GB",
"ratio": "1.2",
"seedingPoints": "200000",
"privilege": "可以在做种/下载/发布的时候选择匿名模式。"
},{
"level": "4",
"name": "紫铜(Insane User)",
"interval": "25",
"downloaded": "1TB",
"ratio": "1.3",
"seedingPoints": "400000",
"privilege": "可以查看普通日志"
},{
"level": "5",
"name": "白锡(Veteran User)",
"interval": "40",
"downloaded": "2TB",
"ratio": "1.5",
"seedingPoints": "600000",
"privilege": "可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},{
"level": "6",
"name": "白银(Extreme User)",
"interval": "60",
"downloaded": "3TB",
"ratio": "1.5",
"seedingPoints": "800000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
},{
"level": "7",
"name": "黄金(Ultimate User)",
"interval": "80",
"downloaded": "4TB",
"ratio": "1.7",
"seedingPoints": "1000000",
"privilege": "同白银用户等级权限"
},{
"level": "8",
"name": "铂金(Nexus Master)",
"interval": "100",
"downloaded": "6TB",
"ratio": "1.8",
"seedingPoints": "1200000",
"privilege": "同白银用户等级权限"
}]
}
================================================
FILE: resource/sites/ptsbao.club/config.json
================================================
{
"name": "烧包",
"timezoneOffset": "+0800",
"schema": "NexusPHP",
"url": "https://ptsbao.club/",
"description": "烧包 - 扬帆远航 风雨同路",
"icon": "https://ptsbao.club/favicon.ico",
"tags": ["影视", "综合"],
"host": "ptsbao.club",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "1",
"downloaded": "50GB",
"ratio": "1.05"
},
{
"level": 2,
"name": "Elite User",
"interval": "2",
"downloaded": "150GB",
"ratio": "1.55"
},
{
"level": 3,
"name": "Crazy User",
"interval": "4",
"downloaded": "300GB",
"ratio": "2.05"
},
{
"level": 4,
"name": "Insane User",
"interval": "8",
"downloaded": "500GB",
"ratio": "2.55"
},
{
"level": 5,
"name": "Veteran User",
"interval": "16",
"downloaded": "750GB",
"ratio": "3.05"
},
{
"level": 6,
"name": "Extreme User",
"interval": "24",
"downloaded": "1TB",
"ratio": "3.55"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "36",
"downloaded": "1.5TB",
"ratio": "4.05"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "52",
"downloaded": "3TB",
"ratio": "4.55"
}
],
"collaborator": ["laizony", "ted423"],
"searchEntryConfig": {
"merge": true,
"fieldSelector": {
"progress": {
"selector": ["tr.finished,tr.seeders"],
"filters": ["query.length?100:null"]
},
"status": {
"selector": ["tr.finished", "tr.seeders"],
"switchFilters": [
["255"],
["2"]
]
}
}
},
"selectors": {
"userBaseInfo": {
"merge": true,
"fields": {
"messageCount": {
"selector": ["td[style*='background: indigo'] a[href*='messages.php']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
}
}
},
"userExtendInfo": {
"merge": true,
"fields": {
"levelName": {
"selector": ["td.rowhead:contains('等级') + td b b[class]"],
"filters": ["query.text().trim() + '(' + query.attr('class').replace('User_Name',' User') + ')'"]
}
}
}
}
}
================================================
FILE: resource/sites/pussytorrents.org/config.json
================================================
{
"name": "pussytorrents",
"timezoneOffset": "+0000",
"description": "pussytorrents",
"url": "https://pussytorrents.org/",
"icon": "https://pussytorrents.org/favicon.ico",
"tags": ["xxx"],
"schema": "common",
"host": "pussytorrents.org",
"plugins": [{
"name": "种子详情页面",
"pages": ["^/torrent/(\\d+)$"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["/torrents/browse"],
"scripts": ["/schemas/NexusPHP/common.js", "torrents.js"]
}],
"searchEntryConfig": {
"page": "/torrents/browse",
"queryString": "query=$key$&page=1&inclusions=&exclusions=&inclusionsOp=ALL&order=&orderby=",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "#torrenttable"
},
"searchEntry": [{
"name": "all",
"enabled": true
}],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"id": {
"selector": ["#memberBar .span8 a[href*='/profile/']"]
},
"name": {
"selector": ["#memberBar .span8 a[href*='/profile/']"]
},
"uploaded": {
"selector": ["#memberBar .span8 span[title='Uploaded']"],
"filters": ["$(query[0].nextSibling).text().trim().replace(/,/g,'').sizeToNumber()"]
},
"downloaded": {
"selector": ["#memberBar .span8 span[title='Downloaded']"],
"filters": ["$(query[0].nextSibling).text().trim().replace(/,/g,'').sizeToNumber()"]
},
"messageCount": {
"selector": ["a[href='/users/messages'] i.news-notify"],
"filters": ["query.length>0? 255: 0"]
}
}
},
"userExtendInfo": {
"page": "/profile/$user.name$",
"fields": {
"levelName": {
"selector": ["#profileTable td:contains('Class') + td"]
},
"joinTime": {
"selector": ["#profileTable td:contains('Join Date') + td"],
"filters": ["dateTime(query.text().split(' ').slice(1).join(' '), 'Do MMMM YYYY').valueOf()"]
}
}
},
"userSeedingTorrents": {
"page": "/user/account/snatchlist",
"dataType": "json",
"parser": "getUserSeedingTorrents.js",
"requestMethod": "POST",
"requestData": {
"userID": "$user.id$",
"sEcho": 0,
"iColumns": "9",
"sColumns": ",,,,,,,,",
"iDisplayStart": "0",
"iDisplayLength": "50",
"mDataProp_0": "0",
"sSearch_0": "",
"bRegex_0": "false",
"bSearchable_0": "true",
"bSortable_0": "true",
"mDataProp_1": "1",
"sSearch_1": "",
"bRegex_1": "false",
"bSearchable_1": "true",
"bSortable_1": "true",
"mDataProp_2": "2",
"sSearch_2": "",
"bRegex_2": "false",
"bSearchable_2": "true",
"bSortable_2": "true",
"mDataProp_3": "3",
"sSearch_3": "",
"bRegex_3": "false",
"bSearchable_3": "true",
"bSortable_3": "true",
"mDataProp_4": "4",
"sSearch_4": "",
"bRegex_4": "false",
"bSearchable_4": "true",
"bSortable_4": "true",
"mDataProp_5": "5",
"sSearch_5": "",
"bRegex_5": "false",
"bSearchable_5": "true",
"bSortable_5": "true",
"mDataProp_6": "6",
"sSearch_6": "",
"bRegex_6": "false",
"bSearchable_6": "true",
"bSortable_6": "true",
"mDataProp_7": "7",
"sSearch_7": "",
"bRegex_7": "false",
"bSearchable_7": "true",
"bSortable_7": "true",
"mDataProp_8": "8",
"sSearch_8": "",
"bRegex_8": "false",
"bSearchable_8": "true",
"bSortable_8": "true",
"sSearch": "",
"bRegex": "false",
"iSortCol_0": "0",
"sSortDir_0": "desc",
"iSortingCols": "1"
}
}
}
}
================================================
FILE: resource/sites/pussytorrents.org/details.js
================================================
(function($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
if (this.getDownloadURL()) {
this.initDetailButtons();
}
}
/**
* 获取下载链接
*/
getDownloadURL() {
let query = $("#torrentTools form");
let url = "";
if (query.length > 0) {
url = query.attr("action");
}
if (!url) {
return "";
}
return this.getFullURL(url);
}
/**
* 获取当前种子标题
*/
getTitle() {
let title = $("title").text();
let datas = /\"(.*?)\"/.exec(title);
if (datas && datas.length > 1) {
return datas[1] || title;
}
return title;
}
}
new App().init();
})(jQuery, window);
================================================
FILE: resource/sites/pussytorrents.org/getSearchResult.js
================================================
(function(options) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/login-form/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let site = options.site;
let selector =
options.resultSelector || "div.table-responsive > table:first";
let table = options.page.find(selector);
// 获取种子列表行
let rows = table.find("> tbody > tr");
if (rows.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return [];
}
let results = [];
// 获取表头
let header = table.find("> thead > tr > th");
let beginRowIndex = 0;
if (header.length == 0) {
beginRowIndex = 1;
header = rows.eq(0).find("th,td");
}
// 用于定位每个字段所列的位置
let fieldIndex = {
// 发布时间
time: 0,
// 大小
size: 3,
// 上传数量
seeders: 5,
// 下载数量
leechers: 6,
// 完成数量
completed: 4,
// 评论数量
comments: 2,
// 发布人
author: header.length - 1,
};
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
// 获取字段所在的列
for (let index = 0; index < header.length; index++) {
let cell = header.eq(index);
let text = cell.text();
// 评论数
if (cell.find("a[data-orderby*='numComments']").length) {
fieldIndex.comments = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 大小
if (cell.find("a[data-orderby*='size']").length) {
fieldIndex.size = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 种子数
if (cell.find("a[data-orderby*='Seeders']").length) {
fieldIndex.seeders = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 下载数
if (cell.find("a[data-orderby*='Leechers']").length) {
fieldIndex.leechers = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
// 完成数
if (cell.find("a[data-orderby*='complete']").length) {
fieldIndex.completed = index;
fieldIndex.author =
index == fieldIndex.author ? -1 : fieldIndex.author;
continue;
}
}
try {
// 遍历数据行
for (let index = beginRowIndex; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = row.find(
"span.title a[href*='/torrent/']"
);
if (title.length == 0) {
title = row.find("a[href*='/t/']:first");
}
if (title.length == 0) {
continue;
}
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
// 获取下载链接
let url = row.find("a[href*='/download/']").attr("href");
if (url.length == 0) {
continue;
}
if (url && url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
let data = {
title: title.text(),
subTitle: "",
link,
url: url,
size:
cells
.eq(fieldIndex.size)
.text()
.trim() || 0,
time: this.getTime(row),
author:
fieldIndex.author == -1
? ""
: cells.eq(fieldIndex.author).text() || "",
seeders:
fieldIndex.seeders == -1
? ""
: cells.eq(fieldIndex.seeders).text() || 0,
leechers:
fieldIndex.leechers == -1
? ""
: cells.eq(fieldIndex.leechers).text() || 0,
completed:
fieldIndex.completed == -1
? ""
: cells.eq(fieldIndex.completed).text() || 0,
comments:
fieldIndex.comments == -1
? ""
: cells.eq(fieldIndex.comments).text() || 0,
site: site,
entryName: options.entry.name
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
}
} catch (error) {
console.log(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.stack}`;
}
return results;
}
getTime(row) {
let text = row.find(".subnote").text().replace('Added on ','');
if (text) {
if (text.indexOf("|") > 0) {
return text.split("|")[1].trim();
}
}
return text;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options);
================================================
FILE: resource/sites/pussytorrents.org/getUserSeedingTorrents.js
================================================
if ("".getQueryString === undefined) {
String.prototype.getQueryString = function(name, split) {
if (split == undefined) split = "&";
var reg = new RegExp(
"(^|" + split + "|\\?)" + name + "=([^" + split + "]*)(" + split + "|$)"
),
r;
if ((r = this.match(reg))) return decodeURI(r[2]);
return null;
};
}
(function(options, User) {
class Parser {
constructor(options, dataURL) {
this.options = options;
this.dataURL = dataURL;
this.body = null;
this.rawData = "";
this.pageInfo = {
count: 0,
current: 1
};
this.result = {
seedingSize: 0,
};
this.load();
}
/**
* 完成
*/
done() {
this.options.resolve(this.result);
}
/**
* 解析内容
*/
parse() {
const doc = new DOMParser().parseFromString(this.rawData, "text/html");
// 构造 jQuery 对象
this.body = $(doc).find("body");
this.getPageInfo();
let results = {
seedingSize: 0
};
let status = this.body
.find("table.table > tbody > tr")
.find(">td[class*='text-']");
let torrentsize = this.body.find("table.table > tbody > tr span[title='File Size']");
for (let index = 0; index < status.length; index++){
let status_i = status.eq(index).text();
let torrentsize_i = torrentsize.eq(index).text().replace(/\"+|\n+|\s+/g,'');
if (status_i == "seed") {
results.seedingSize += torrentsize_i.sizeToNumber();
}
}
this.result.seedingSize += results.seedingSize;
// 是否已到最后一页
if (this.pageInfo.current < this.pageInfo.count) {
this.pageInfo.current++;
this.load();
} else {
this.done();
}
}
/**
* 获取页面相关内容
*/
getPageInfo() {
if (this.pageInfo.count > 0) {
return;
}
// 获取最大页码
const infos = this.body
.find("a[href*='/active']:contains('›'):last")
.parent().prev().find("a[href*='/active']")
.attr("href");
if (infos) {
this.pageInfo.count = parseInt(infos.getQueryString("page"));
} else {
this.pageInfo.count = 2;
}
}
/**
* 加载当前页内容
*/
load() {
let url = this.dataURL;
if (this.pageInfo.current > 1) {
url += "&page=" + this.pageInfo.current;
}
$.get(url)
.done(result => {
this.rawData = result;
this.parse();
})
.fail(() => {
this.done();
});
}
}
let dataURL = options.site.activeURL + options.rule.page;
dataURL = dataURL
.replace("$user.id$", options.userInfo.id)
.replace("$user.name$", options.userInfo.name)
.replace("://", "****")
.replace(/\/\//g, "/")
.replace("****", "://");
new Parser(options, dataURL);
})(_options, _self);
/**
*
_options 表示当前参数
{
site,
rule,
userInfo,
resolve,
reject
}
_self 表示 User(/src/background/user.ts) 类实例
*/
================================================
FILE: resource/sites/pussytorrents.org/torrents.js
================================================
(function($) {
console.log("this is torrents.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $("a[href*='/download/']").toArray();
if (links.length == 0) {
return this.t("getDownloadURLsFailed"); //"获取下载链接失败,未能正确定位到链接";
}
let urls = $.map(links, item => {
let link = $(item).attr("href");
return this.getFullURL(link);
});
return urls;
}
/**
* 下载拖放的种子
* @param {*} data
* @param {*} callback
*/
downloadFromDroper(data, callback) {
if (typeof data === "string") {
data = {
url: data,
title: ""
};
}
console.log(data);
if (!data.url) {
PTService.showNotice({
msg: this.t("invalidURL") //"无效的链接"
});
callback();
return;
}
if (data.url.substr(0, 1) === "/") {
data.url = `${location.origin}${data.url}`;
} else if (data.url.substr(0, 4) !== "http") {
data.url = `${location.origin}/${data.url}`;
}
this.sendTorrentToDefaultClient(result)
.then(result => {
callback(result);
})
.catch(result => {
callback(result);
});
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("#torrent_table").find(
"td.td-size:contains('MB'),td[align='center']:contains('GB'),td[align='center']:contains('TB')"
)
);
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/redacted.ch/config.json
================================================
{
"name": "RED",
"timezoneOffset": "+0000",
"description": "music",
"url": "https://redacted.ch/",
"icon": "https://redacted.ch/favicon.ico",
"tags": ["音乐"],
"schema": "GazelleJSONAPI",
"host": "redacted.ch",
"collaborator": ["ylxb2016", "enigamz"],
"searchEntryConfig": {
"skipIMDbId": true
},
"searchEntry": [{
"name": "all",
"enabled": true
},
{
"queryString": "filter_cat[1]=1",
"name": "Music",
"enabled": false
},
{
"queryString": "filter_cat[2]=1",
"name": "Applications",
"enabled": false
},
{
"queryString": "filter_cat[3]=1",
"name": "E-Books",
"enabled": false
},
{
"queryString": "filter_cat[4]=1",
"name": "Audiobooks",
"enabled": false
},
{
"queryString": "filter_cat[5]=1",
"name": "E-Learning Videos",
"enabled": false
},
{
"queryString": "filter_cat[6]=1",
"name": "Comedy",
"enabled": false
},
{
"queryString": "filter_cat[7]=1",
"name": "Comics",
"enabled": false
}
],
"selectors": {
"userSeedingTorrents": {
"page": "/ajax.php?action=community_stats&userid=$user.id$",
"dataType": "json",
"fields": {
"seedingSize": {
"selector": ["response.seedingsize"],
"filters": ["query.replace(/,/g,'').sizeToNumber()"]
},
"bonus": {
"value":"N/A"
}
}
}
},
"supportedFeatures": {
"imdbSearch": false
}
}
================================================
FILE: resource/sites/resource.xidian.edu.cn/config.json
================================================
{
"name": "睿思",
"timezoneOffset": "+0800",
"description": "西电睿思PT",
"url": "http://resource.xidian.edu.cn/",
"icon": "http://resource.xidian.edu.cn/favicon.ico",
"tags": [
"教育网",
"影视",
"综合"
],
"schema": "NexusPHP",
"host": "resource.xidian.edu.cn",
"collaborator": "luy",
"searchEntry": [
{
"name": "全站",
"enabled": true
},
{
"queryString": "cat401=1",
"name": "电影",
"enabled": false
},
{
"queryString": "cat402=1",
"name": "电视剧",
"enabled": false
},
{
"queryString": "cat403=1",
"name": "综艺",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "纪录片",
"enabled": false
},
{
"queryString": "cat405=1",
"name": "动漫",
"enabled": false
},
{
"queryString": "cat406=1",
"name": "MV",
"enabled": false
},
{
"queryString": "cat407=1",
"name": "体育",
"enabled": false
},
{
"queryString": "cat408=1",
"name": "音乐",
"enabled": false
},
{
"queryString": "cat410=1",
"name": "游戏",
"enabled": false
},
{
"queryString": "cat411=1",
"name": "学习",
"enabled": false
},
{
"queryString": "cat412=1",
"name": "软件",
"enabled": false
},
{
"queryString": "cat409=1",
"name": "其他",
"enabled": false
}
],
"categories": [{
"entry": "*",
"result": "&cat$id$=1",
"category": [{
"id": 401,
"name": "电影"
},
{
"id": 402,
"name": "电视剧"
},
{
"id": 403,
"name": "综艺"
},
{
"id": 404,
"name": "纪录片"
},
{
"id": 405,
"name": "动漫"
},
{
"id": 406,
"name": "MV"
},
{
"id": 407,
"name": "体育"
},
{
"id": 408,
"name": "音乐"
},
{
"id": 410,
"name": "游戏"
},
{
"id": 411,
"name": "学习"
},
{
"id": 412,
"name": "软件"
},
{
"id": 409,
"name": "其他"
}
]
}],
"cdn": ["http://resource.xidian.edu.cn/"]
}
================================================
FILE: resource/sites/sdbits.org/browse.js
================================================
(function ($) {
console.log("this is browse.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
isNexusPHP() {//want use same code
return PTService.site.schema == "SDB";
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons(false);
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let siteURL = PTService.site.url;
let links = $("a[href*='download.php']").toArray();
let urls = $.map(links, (item) => {
let link = $(item).attr("href");
link = link.replace("source=browse", "source=rss");
link = link.replace(new RegExp("/download.php/.*\.torrent"),"download.php");
if (link && link.substr(0, 4) !== "http") {
link = `${siteURL}${link}`;
}
return link;
});
if (links.length == 0) {
return "获取下载链接失败,未能正确定位到链接";
}
return urls;
}
/**
* 执行指定的操作
* @param {*} action 需要执行的执令
* @param {*} data 附加数据
* @return Promise
*/
call(action, data) {
return new Promise((resolve, reject) => {
switch (action) {
// 从当前的DOM中获取下载链接地址
case PTService.action.downloadFromDroper:
this.downloadFromDroper(data, () => {
resolve()
});
break;
}
});
}
getDroperURL(url) {
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (!url.getQueryString) {
PTService.showNotice({
msg:
"系统依赖函数(getQueryString)未正确加载,请尝试刷新页面或重新启用插件。"
});
return null;
}
if (url.indexOf("download.php") == -1) {
let id = url.getQueryString("id");
let firstlink = $("a[href*='download.php']:first");
let passkey = firstlink.attr("href").getQueryString("passkey");
if (id) {
// 如果站点没有配置禁用https,则默认添加https链接
url =
siteURL +
"download.php?id=" +
id +
(PTService.site.passkey
? "&passkey=" + PTService.site.passkey
: passkey ? "&passkey="+ passkey : "") +
"&source=rss";
} else {
url = "";
}
}
return url;
}
/**
* 下载拖放的种子
* @param {*} data
* @param {*} callback
*/
downloadFromDroper(data, callback) {
if (typeof data === "string") {
data = {
url: data,
title: ""
};
}
let result = this.getDroperURL(data.url);
if (!result) {
callback();
return;
}
this.sendTorrentToDefaultClient(result).then((result) => {
callback(result);
}).catch((result) => {
callback(result);
});
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize($("#torrent-list").find("td.center:contains('MiB'),td.center:contains('GiB'),td.center:contains('TiB')"));
}
}
(new App()).init();
})(jQuery);
================================================
FILE: resource/sites/sdbits.org/config.json
================================================
{
"name": "SDBits",
"timezoneOffset": "+0000",
"description": "SDB, HDB姊妹站",
"url": "https://sdbits.org/",
"icon": "https://sdbits.org/favicon.ico",
"tags": ["影视", "综合"],
"schema": "SDB",
"plugins": [{
"name": "种子详情页面",
"pages": ["^/t/(\\d+)/$", "/details.php"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["/browse.php"],
"scripts": ["/schemas/NexusPHP/common.js", "browse.js"]
}],
"host": "sdbits.org",
"collaborator": "luckiestone",
"levelRequirements": [
{
"level": "1",
"name": "DVD",
"interval": "4",
"downloaded": "30GB",
"ratio": "0.95",
"privilege": "Are able to leech 100 torrents at a time. You can view NFOs and request reseeds on poorly seeded torrents."
},
{
"level": "2",
"name": "SuperBit",
"interval": "4",
"downloaded": "500GB",
"ratio": "1.4",
"privilege": "As DVD"
},
{
"level": "3",
"name": "Criterion",
"interval": "4",
"downloaded": "500GB",
"ratio": "2.5",
"privilege": "As DVD"
}
],
"searchEntryConfig": {
"page": "/browse.php",
"queryString": "search=$key$",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "table#torrent-list:last > tbody > tr:not(:eq(0))",
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"queryString": "imdb=$key$"
}]
},
"searchEntry": [{
"name": "全部",
"enabled": true
},
{
"queryString": "cat=1",
"name": "Movie",
"enabled": false
},
{
"queryString": "cat=2",
"name": "TV",
"enabled": false
},
{
"queryString": "cat=3",
"name": "Documentary",
"enabled": false
},
{
"queryString": "cat=4",
"name": "Music",
"enabled": false
},
{
"queryString": "cat=5",
"name": "Sports",
"enabled": false
},
{
"queryString": "cat=6",
"name": "Audio",
"enabled": false
},
{
"queryString": "cat=7",
"name": "Stand-up Comedy",
"enabled": false
}
],
"categories": [{
"entry": "browse.php?",
"result": "cat=$id$",
"category": [{
"id": 1,
"name": "Movie"
},
{
"id": 2,
"name": "TV"
},
{
"id": 3,
"name": "Documentary"
},
{
"id": 4,
"name": "Music"
},
{
"id": 5,
"name": "Sports"
},
{
"id": 6,
"name": "Audio"
},
{
"id": 7,
"name": "Stand-up Comedy"
}
]
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "a[style^='color:#000099']"
}],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": "a[href*='userdetails.php']:first",
"attribute": "href",
"filters": ["query ? query.getQueryString('id'):''"]
},
"name": {
"selector": "a[href*='userdetails.php']:first"
},
"isLogged": {
"selector": ["a[href*='logout.php']"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["table[bgcolor*='red'] a[href*='inbox.php']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": ["td.rowhead:contains('Uploaded') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["td.rowhead:contains('Downloaded') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"ratio": {
"selector": "font:contains('Ratio') +",
"filters": ["parseFloat(query.text())"]
},
"levelName": {
"selector": ["td.rowhead:contains('Class') + td"]
},
"bonus": {
"selector": ["td.heading:contains('Bonus') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+)/)", "(query && query.length>=2)?query[1]:''"]
},
"joinTime": {
"selector": ["td.rowhead:contains('JOIN'):contains('date') + td"],
"filters": ["query.text().split(' (')[0]", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
}
}
},
"userSeedingTorrents": {
"page": "/userdetails.php?id=$user.id$&seeding=1",
"fields": {
"seedingSize": {
"selector": ["td.heading:contains('Currently'):contains('seeding') + td tr:not(:eq(0))"],
"filters": ["jQuery.map(query.find('td:eq(3)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
},
"seeding": {
"selector": ["td.heading:contains('Currently'):contains('seeding') + td tr:not(:eq(0))"],
"filters": ["query.length"]
}
}
}
}
}
================================================
FILE: resource/sites/sdbits.org/details.js
================================================
(function ($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
isNexusPHP() {//want use same code
return PTService.site.schema == "SDB";
}
/**
* 初始化按钮列表
*/
initButtons() {
this.showTorrentSize();
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
let siteURL = PTService.site.url;
let query = $("a[href*='download.php']");
let url = "";
if (query.length > 0) {
url = query.attr("href");
url = url.replace("source=browse", "source=rss");
url = url.replace(new RegExp("/download.php/.*\.torrent"),"download.php");
if (url && url.substr(0, 4) !== "http") {
url = `${siteURL}${url}`;
}
}
return url;
}
showTorrentSize() {
let query = $("td.heading:contains('Size') + td");
let size = "";
if (query.length > 0) {
size = query.text().match(/^[^\(]+/);
// attachment
PTService.addButton({
title: "当前种子大小",
icon: "attachment",
label: size
});
}
}
getTitle() {
let query = $("a[href*='download.php']");
return query ? query.text().replace(".torrent", ""): "";
}
};
(new App()).init();
})(jQuery, window);
================================================
FILE: resource/sites/sdbits.org/getSearchResult.js
================================================
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/\/doLogin/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
if (/Nothing found/.test(options.responseText)) {
options.status = ESearchResultParseStatus.noTorrents;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let results = [];
let site = options.site;
// 获取种子列表行
let rows = options.page.find(
options.resultSelector || "table#torrent-list:last > tbody > tr:not(:eq(0))"
);
// 用于定位每个字段所列的位置
let fieldIndex = {
// 时间
time: 4,
// 大小
size: 5,
// 上传人数
seeders: 7,
// 下载人数
leechers: 8,
// 完成人数
completed: 6,
// 标题
name: 2,
// 发布人
author: 9,
//配置
category: 0
};
if (site.url.substr(-1) == "/") {
site.url = site.url.substr(0, site.url.length - 1);
}
// 遍历数据行
for (let index = 0; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = cells.eq(fieldIndex.name).find("b > a");
if (title.length == 0) {
continue;
}
let titleStrings = title.html().split("::");
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}/${link}`;
}
let url = row.find("a[href*='download.php']").attr("href");
if (url && url.substr(0, 4) !== "http") {
url = `${site.url}/${url}`;
}
if (!url) {
continue;
}
let subTitle = "";
if (titleStrings.length > 0) {
subTitle = $("")
.html(titleStrings[1])
.text();
}
let time =
cells
.eq(fieldIndex.time)
.text()
.replace(/([a-zA-Z]+)/g, "$1 ")
.replace(/^\s+|\s+$/g, "") + ".";
let data = {
title: $("")
.html(titleStrings[0])
.text(),
subTitle: subTitle || "",
link,
url: url,
size: cells.eq(fieldIndex.size).html() || 0,
time: time || "",
author: cells.eq(fieldIndex.author).text() || "",
seeders:
cells
.eq(fieldIndex.seeders)
.text()
.split("/")[0] || 0,
leechers:
cells
.eq(fieldIndex.leechers)
.text()
.split("/")[1] || 0,
completed: cells.eq(fieldIndex.completed).text() || 0,
comments: cells.eq(fieldIndex.comments).text() || 0,
site: site,
entryName: options.entry.name,
category: this.getCategory(cells.eq(fieldIndex.category)),
tags: Searcher.getRowTags(site, row)
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
}
return results;
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: "",
link: ""
};
let link = cell.find("a:first");
result.link = link.attr("href");
let id = result.link.match(/cat=(\d+)/)[1];
if (result.link.substr(0, 4) !== "http") {
result.link = options.site.url + result.link;
}
result.name = this.getCategoryName(id);
return result;
}
getCategoryName(id) {
if ($.isEmptyObject(this.categories)) {
let cells = options.page
.find("table.bottom > tbody > tr")
.eq(1)
.find("td");
cells.each((i, dom) => {
let id = $(dom)
.find("input")
.attr("id");
id = id.replace("c", "");
let name = $(dom)
.find("a")
.text();
if (id) {
this.categories[id] = name;
}
});
}
return this.categories ? this.categories[id] : "";
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/sites/shadowthein.net/browse.js
================================================
(function ($) {
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $(
"table#torrenttable:last a[href*='download.php']"
).toArray();
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (links.length == 0) {
// "获取下载链接失败,未能正确定位到链接";
return this.t("getDownloadURLsFailed");
}
let urls = $.map(links, item => {
let link = $(item).attr("href");
if (link && link.substr(0, 4) != "http") {
link = siteURL + link;
}
return link;
});
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("table#browse:last").find(
"td:contains('MB'),td:contains('GB'),td:contains('TB')"
)
);
}
/**
* 获取有效的拖放地址
* @param {*} url
*/
getDroperURL(url) {
if (url.indexOf("down.php") === -1) {
return "";
}
return url;
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/shadowthein.net/config.json
================================================
{
"name": "inTheShadow",
"timezoneOffset": "+0000",
"description": "iTS",
"url": "https://shadowthein.net/",
"icon": "https://shadowthein.net/favicon.ico",
"tags": ["影视", "音乐", "文学"],
"schema": "iTS",
"host": "shadowthein.net",
"collaborator": [
"luckiestone",
"MewX"
],
"plugins": [{
"name": "种子详情页面",
"pages": ["/details.php"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["/browse.php"],
"scripts": ["/schemas/NexusPHP/common.js", "browse.js"]
}],
"searchEntryConfig": {
"page": "/browse.php",
"queryString": "search=$key$&incldead=1",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "table[id='torrenttable']:last > tbody > tr",
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"queryString": "incldead=1&search=$key$&search_in=all"
}]
},
"searchEntry": [{
"name": "All",
"enabled": true
}],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"id": {
"selector": "a[href*='userdetails.php']:first",
"attribute": "href",
"filters": ["query ? query.getQueryString('id'):''"]
},
"name": {
"selector": "a[href*='userdetails.php']:first"
},
"isLogged": {
"selector": ["a[href*='logout.php']"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["td[bgcolor*='red'] a[href*='message.php']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"seeding": {
"selector": ["div#seeds_div"],
"filters": ["query.text().match(/([\\d.]+).*?-/)", "(query && query.length>=2)?query[1]:0"]
},
"levelName": {
"selector": ["td.row2:contains('Tracker'):contains('Class') + td"]
},
"joinTime": {
"selector": ["td.row2:contains('Join'):contains('Date') + td"],
"filters": ["query.text().split(' (')[0]", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
},
"bonus": {
"selector": "td.row2:contains('Karma') + td",
"filters": ["query.text().replace(/,|\\n|\\s+/g,'')"]
}
}
},
"userSeedingTorrents": {
"page": "/",
"fields": {
"uploaded": {
"selector": ["to do"],
"filters": ["to do"]
},
"downloaded": {
"selector": ["to do"],
"filters": ["to do"]
},
"ratio": {
"selector": ["to do"],
"filters": ["to do"]
},
"seedingSize": {
"selector": ["to do"],
"filters": ["to do"]
}
}
}
}
}
================================================
FILE: resource/sites/shadowthein.net/details.js
================================================
(function ($, window) {
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.showTorrentSize();
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
let query = $("a.index[href*='download.php']");
let url = "";
if (query.length > 0) {
url = query.attr("href");
}
if (!url) {
return "";
}
return `${location.origin}${url}`;
}
showTorrentSize() {
let query = $("td.row2:contains('Size') + td");
let size = "";
if (query.length > 0) {
size = query.text().match(/^[^\(]+/);
// attachment
PTService.addButton({
title: "当前种子大小",
icon: "attachment",
label: size
});
}
}
/**
* 获取当前种子标题
*/
getTitle() {
return $("table.main h1:first")
.text()
.trim();
}
}
new App().init();
})(jQuery, window);
================================================
FILE: resource/sites/shadowthein.net/getSearchResult.js
================================================
(function(options) {
class Parser {
constructor() {
this.haveData = false;
if (/takelogin\.php/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
if (
/没有种子|No [Tt]orrents?|Your search did not match anything|用准确的关键字重试/.test(
options.responseText
)
) {
options.status = ESearchResultParseStatus.noTorrents;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let results = [];
let site = options.site;
// 获取种子列表行
let rows = options.page.find(
options.resultSelector || "table[id='torrenttable']:last > tbody > tr"
);
// 用于定位每个字段所列的位置
let fieldIndex = {
//title
title: 1,
//downloadlink
downloadlink: 3,
// 时间
time: 6,
// 大小
size: 7,
// 上传人数
seeders: 9,
// 下载人数
leechers: 10,
// 完成人数
completed: 8,
// 评论人数
comments: 5,
// 发布人
author: 11,
category: 0
};
if (site.url.substr(-1) == "/") {
site.url = site.url.substr(0, site.url.length - 1);
}
// 遍历数据行
for (let index = 1; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = cells.eq(fieldIndex.title).find("a[href*='details.php?id=']").first();
if (title.length == 0) {
continue;
}
let titleStrings = title.text();
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}/${link}`;
}
let url = "";
url = cells.eq(fieldIndex.downloadlink).find("a[href*='/download.php']").first().attr("href");
if (url && url.substr(0, 4) !== "http") {
url = `${site.url}/${url}`;
}
if (!url) {
continue;
}
let time = cells.eq(fieldIndex.time).text();
let data = {
title: titleStrings,
link: link,
url: url,
size: cells.eq(fieldIndex.size).text() || 0,
time: time,
author: cells.eq(fieldIndex.author).text() || "",
seeders:
cells
.eq(fieldIndex.seeders)
.text(),
leechers:
cells
.eq(fieldIndex.leechers)
.text(),
completed: cells.eq(fieldIndex.completed).text(),
comments: cells.eq(fieldIndex.comments).find("a[href*='#startcomments']").text() || 0,
site: site,
entryName: options.entry.name,
category: this.getCategory(cells.eq(fieldIndex.category)),
tags: this.getTags(row, options.torrentTagSelectors)
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
}
return results;
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: "",
link: ""
};
let link = cell.find("a:first");
let img = link.find("img:first");
result.link = link.attr("href");
if (result.link.substr(0, 4) !== "http") {
result.link = options.site.url + result.link;
}
result.name = img.attr("alt");
return result;
}
/**
* 获取标签
* @param {*} row
* @param {*} selectors
* @return array
*/
getTags(row, selectors) {
let tags = [];
if (selectors && selectors.length > 0) {
// 使用 some 避免错误的背景类名返回多个标签
selectors.some(item => {
if (item.selector) {
let result = row.find(item.selector);
if (result.length) {
tags.push({
name: item.name,
color: item.color
});
return true;
}
}
});
}
return tags;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options);
================================================
FILE: resource/sites/speedapp.io/config.json
================================================
{
"name": "SpeedApp",
"timezoneOffset": "+0000",
"description": "Romania site, Half i18n support",
"url": "https://speedapp.io/",
"tags": ["影视", "综合","Adult"],
"schema": "Common",
"plugins": [{
"name": "种子详情页面",
"pages": ["^/browse/[1-9](.+)$"],
"scripts": ["/schemas/Common/common.js", "/schemas/Common/details.js"]
}, {
"name": "种子列表",
"pages": ["^/browse$","^/internal$","^/adult$"],
"scripts": ["/schemas/Common/common.js", "/schemas/Common/torrents.js"]
}],
"host": "speedapp.io",
"levelRequirements": [
{
"level": "1",
"name": "Power User",
"interval": "13",
"uploaded": "200GB",
"ratio": "2",
"privilege": "Can make requests"
},
{
"level": "2",
"name": "Elite User",
"interval": "26",
"uploaded": "1TB",
"ratio": "3",
"privilege": "Can be chosen as Hyperseeders"
},
{
"level": "3",
"name": "Xtreme User",
"interval": "52",
"uploaded": "5TB",
"ratio": "4",
"privilege": "None"
},
{
"level": "4",
"name": "Super User",
"interval": "103",
"uploaded": "20TB",
"ratio": "5",
"privilege": "None"
},
{
"level": "5",
"name": "Legend User",
"interval": "309",
"uploaded": "100TB",
"ratio": "6",
"privilege": "None"
}
],
"searchEntryConfig": {
"page": "/browse?search=$key$",
"loggedRegex": "href=\"\/profile\"",
"resultType": "html",
"resultSelector": "div.card-body.p-0",
"dataRowSelector": "div.row.mr-0.ml-0.py-3",
"dataCellSelector": ">div",
"fieldIndex": {
"category": 0,
"title": 0,
"link": 0,
"url": 5,
"comments": 4,
"time": 1,
"size": 3,
"seeders": 4,
"leechers": 4,
"completed": 2
},
"fieldSelector": {
"title": {
"selector": ["a[data-poload]"],
"filters": ["query.text()"]
},
"category": {
"selector": ["use"],
"filters": ["query.attr('xlink:href').split('#')[1]"]
},
"time": {
"selector": [""],
"filters": [ "query.attr('title')", "dateTime(query).isValid() ? dateTime(query).valueOf() : dateTime(query.replace('下午','PM ').replace('上午','AM ').replace('日','').replaceAll(/年|月/g,'-'), 'YYYY-M-D A hh:mm:ss').format('YYYY-M-D HH:mm')" ]
},
"seeders": {
"selector": ["span:contains('seeders')"],
"filters": ["parseInt(query.text().replace('seeders','').replace(/,/g,''))"]
},
"leechers": {
"selector": ["span:contains('leechers')"],
"filters": ["parseInt(query.text().replace('leechers','').replace(/,/g,''))"]
},
"comments": {
"selector": ["a:contains('comments')"],
"filters": ["parseInt(query.text().replace('comments','').replace(/,/g,''))"]
},
"link": {
"selector": ["a[data-poload]"],
"filters": ["query.attr('href')", "'https://speedapp.io/'+query"]
},
"url": {
"selector": ["a.btn.btn-success"],
"filters": ["query.attr('href')", "'https://speedapp.io/'+query"]
}
}
},
"searchEntry": [{
"name": "Normal",
"enabled": true
}, {
"entry": "/internal?search=$key$",
"name": "internal",
"enabled": false
}, {
"entry": "/adult?search=$key$",
"name": "adult",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "span.label.label-succes:contains('free')"
}, {
"name": "50%",
"selector": "span.label.label-dark:contains('half')"
}],
"selectors": {
"userBaseInfo": {
"page": "/profile",
"fields": {
"name": {
"selector": "#kt_quick_user_toggle > span.text-dark-50"
},
"isLogged": {
"selector": ["#kt_quick_user_toggle > span.text-dark-50"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["#notifications-oc-toggle > div.btn > .label-danger"],
"filters": ["query.length?parseInt(query.text()):0"]
},
"uploaded": {
"selector": ["dt:contains('已上传') + dd","dt:contains('Uploaded') + dd","dt:contains('Incarcat') + dd"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["dt:contains('已下载') + dd","dt:contains('Downloaded') + dd","dt:contains('Descarcat') + dd"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"ratio": {
"selector": ["dt:contains('比率') + dd","dt:contains('Ratio') + dd","dt:contains('Ratie') + dd"],
"filters": ["query.text()"]
},
"levelName": {
"selector": ["div.card-body.pt-4 >div.align-items-center div.text-muted"],
"filters": ["$(query.contents()[0]).text().trim()"]
},
"joinTime": {
"selector": ["dt:contains('注册日期') + dd, dt:contains('Signup date') + dd, dt:contains('Data inregistrarii') + dd"],
"filters": [ "query.text()", "dateTime(query).isValid() ? dateTime(query).valueOf() : dateTime(query.replace('下午','PM ').replace('上午','AM ').replace('日','').replaceAll(/年|月/g,'-'), 'YYYY-M-D A hh:mm:ss').valueOf()" ]
},
"seedingSize": {
"selector": ["dt:contains('奖励积分') + dd > b:nth-of-type(2)","dt:contains('Bonus points') + dd > b:nth-of-type(2)","dt:contains('Puncte bonus') + dd > b:nth-of-type(2)"],
"filters": ["query.text().replace(/,|\\s|\\n/g,'').sizeToNumber()"]
},
"bonusPerHour": {
"selector": [
"dt:contains('奖励积分') + dd > b:eq(0)",
"dt:contains('Bonus points') + dd > b:eq(0)",
"dt:contains('Puncte bonus') + dd > b:eq(0)"
],
"filters": ["parseFloat(query.text())"]
}
}
},
"userExtendInfo": {
"page": "/profile/menu-stats",
"fields": {
"bonus": {
"selector": ["a[href='/shop'][title='奖励积分'], a[href='/shop'][title='Bonus points'], a[href='/shop'][title='Puncte bonus']"],
"filters": ["parseFloat(query.text().replace(/,|\\s|\\n/g,''))"]
},
"seeding": {
"selector": ["a[href='/snatch/seeding'][title='目前正在播种种子'],a[href='/snatch/seeding'][title='Currently seeding torrents'],a[href='/snatch/seeding'][title='Torrente ce se incarca']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):null"]
}
}
},
"common": {
"page": "/browse/",
"fields": {
"downloadURL": {
"selector": ["a[href*='.torrent']"],
"filters": ["query.attr('href')"]
},
"size": {
"selector": ["div.card-body > div.row > div.justify-content-end > div:contains('B')"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"]
},
"sayThanksButton": {
"selector": ["a.btn.btn-hover-success[href*='?thanks']"],
"filters": ["query"]
},
"downloadURLs": {
"selector": ["a[href*='.torrent']"],
"filters": ["query.toArray()"]
},
"confirmSize": {
"selector": ["div.container > div.row >div.col-12.gutter-b div.row.mr-0.ml-0.py-3 > div.col-6.col-sm-4.col-md-1.text-center.text-muted:contains('B')"],
"filters": ["query"]
}
}
}
}
}
================================================
FILE: resource/sites/sportscult.org/config.json
================================================
{
"name": "sportscult",
"timezoneOffset": "+0800",
"description": "sportscult",
"url": "https://sportscult.org/",
"icon": "https://sportscult.org/favicon.ico",
"tags": ["体育"],
"schema": "Common",
"collaborator": ["枕头啊枕头", "zhuweitung"],
"plugins": [
{
"name": "种子详情页面",
"pages": ["/index.php"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}
],
"host": "sportscult.org",
"levelRequirements": [
{
"level": "1",
"name": "Athlete",
"uploaded": "50GB",
"ratio": "0.90",
"privilege": "Access to: Online Users, Tracker info, Live TV"
},
{
"level": "2",
"name": "ProAthlete",
"uploaded": "250GB",
"ratio": "1.80",
"privilege": "Access to: Online Users, Tracker info, Live TV, Requests, Top 10, and Users"
}
],
"searchEntryConfig": {
"page": "/index.php?page=torrents",
"queryString": "search=$key$&active=0",
"resultType": "html",
"resultSelector": "#bodyarea > table > tbody > tr > td:nth-child(2) > div > .block-content > div > div > div table:nth-child(4) > tbody > tr:nth-child(2) > td > table > tbody > tr:not(:first-child)",
"dataRowSelector": " > tbody > tr:not(:first-child)",
"fieldIndex": {
"title": 1,
"link": 1,
"url": 2,
"time": 4,
"size": 3,
"seeders": 5,
"leechers": 6,
"completed": 7
},
"fieldSelector": {
"title": {
"selector": [""],
"filters": [
"query.get(0).firstChild",
"query.nodeValue||query.innerText||0"
]
},
"link": {
"selector": [""],
"filters": [
"query.children().attr('href')",
"'https://sportscult.org/'+query"
]
},
"url": {
"selector": [""],
"filters": [
"query.children().attr('href')",
"'https://sportscult.org/'+query"
]
}
}
},
"searchEntry": [
{
"name": "全部",
"enabled": true
},
{
"queryString": "index.php?page=torrents&search=$key$&category=47&active=1&gold=0",
"name": "EPL",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=41&active=1&gold=0",
"name": "American Football",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=54",
"name": "AutoMotoRacing",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=17",
"name": "Athletics",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=51",
"name": "Baseball",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=34",
"name": "Bodybuilding/Fitness",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=50",
"name": "Golf",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=29",
"name": "Boxing",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=19",
"name": "BrainGames",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=36",
"name": "BreakDance",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=40",
"name": "Golf",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=23",
"name": "Cycling",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=31",
"name": "Documentary",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=1",
"name": "European Basketball",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=6",
"name": "European Soccer",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=37",
"name": "Extreme Sports",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=9",
"name": "Fight Sports",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=32",
"name": "Formula1",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=45",
"name": "GAA (Gaelic)",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=8",
"name": "Golf",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=22",
"name": "Gymnastics",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=39",
"name": "Handball",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=2",
"name": "International Basket",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=25",
"name": "IceHockey",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=4",
"name": "International Soccer",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=42",
"name": "KHL",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=35",
"name": "KickBoxing/Muay Thai",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=43",
"name": "La Liga",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=15",
"name": "MotorSport",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=24",
"name": "MLB/Baseball",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=28",
"name": "MMA",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=11",
"name": "NBA/WNBA",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=3",
"name": "NCAA Basket/Football",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=5",
"name": "NFL",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=27",
"name": "NHL",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=26",
"name": "Olympic games",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=7",
"name": "Rugby",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=44",
"name": "Serie A",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=38",
"name": "Snooker/Pool",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=30",
"name": "Streetball",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=18",
"name": "Swimming/Aquatics",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=46",
"name": "AFL(AustralianFB)",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=12",
"name": "Tennis",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=20",
"name": "Volleyball/Beach",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=21",
"name": "Weightlifting",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=16",
"name": "WinterSport",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=33",
"name": "Wrestling/Grapling",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=48",
"name": "Uncategorised",
"enabled": false
},
{
"queryString": "index.php?page=torrents&search=$key$&category=53",
"name": "Cricket",
"enabled": false
}
],
"torrentTagSelectors": [
{
"name": "Free",
"selector": "img[src='gold/gold.gif']"
},
{
"name": "50%",
"selector": "img[src='gold/silver.gif']"
}
],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"merge": true,
"fields": {
"id": {
"selector": "a[href*='index.php?page=usercp']:first",
"attribute": "href",
"filters": ["query ? query.getQueryString('uid'):''"]
},
"isLogged": {
"selector": ["a[href*='logout.php']"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["a[href*='do=pm']"],
"filters": [
"query.text().match(/(\\d+)/)",
"(query && query.length>=2)?parseInt(query[1]):0"
]
}
}
},
"userExtendInfo": {
"page": "/index.php?page=usercp&uid=$user.id$",
"merge": true,
"fields": {
"uploaded": {
"selector": "td.header:contains('Uploaded:') + td",
"filters": [
"(query && query.length > 0) ? query.text().sizeToNumber():null"
]
},
"downloaded": {
"selector": "td.header:contains('Downloaded:') + td",
"filters": [
"(query && query.length > 0) ? query.text().sizeToNumber():null"
]
},
"ratio": {
"selector": "td.header:contains('Ratio:') + td",
"filters": ["parseFloat(query.text().trim())"]
},
"levelName": {
"selector": "td.header:contains('Rank:') + td"
},
"bonus": {
"selector": ["td.green:contains('Bonus')"],
"filters": ["query.text().replace('(Bonus ','').replace(')','')"]
},
"seeding": {
"selector": ["#mcol div.b-content table.lista:eq(2) tbody tr:gt(1)"],
"filters": ["query.length"]
},
"seedingSize": {
"selector": ["#mcol div.b-content table.lista:eq(2) tbody tr:gt(1)"],
"filters": ["jQuery.map(query.find('td:eq(1)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
},
"name": {
"selector": "td.header:contains('User') + td"
},
"joinTime": {
"selector": ["td.header:contains('Joined on') + td"],
"filters": [
"query[0].innerHTML.split('/')",
"query[1]+'-'+query[0]+'-'+query[2]",
"dateTime(query).valueOf()"
]
}
}
},
"bonusExtendInfo": {
"prerequisites": "!user.bonusPerHour",
"page": "/index.php?page=modules&module=seedbonus",
"fields": {
"bonusPerHour": {
"selector": ["#mcol div.b-content > h3:contains('points per hour')"],
"filters": ["parseFloat(query.text().match(/\\d+(?:\\.\\d+)?/)[0])"]
}
}
},
"common": {
"page": "/index.php?page=torrent-details",
"merge": true,
"fields": {
"downloadURL": {
"selector": ["a[href*='download.php?id=']"],
"filters": ["query.attr('href')"]
},
"size": {
"selector": ["td.header:contains('Size') + td"],
"filters": [
"query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
]
},
"sayThanksButton": {
"selector": ["#ty"],
"filters": ["query"]
}
}
}
},
"supportedFeatures": {
"imdbSearch": false
}
}
================================================
FILE: resource/sites/sportscult.org/details.js
================================================
(function ($, window) {
if(/\?page\=torrent-details/.test(window.location.search)){
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.showTorrentSize();
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
let query = $("a[href*='download.php']:first");
let url = "";
if (query.length > 0) {
url = query.attr("href");
if (url.substr(0, 4) != "http") {
url = PTService.site.url + url;
}
}
return url;
}
showTorrentSize() {
let size = PTService.filters.formatSize(PTService.getFieldValue("size"));
PTService.addButton({
title: "当前种子大小",
icon: "attachment",
label: size
});
}
/**
* 获取当前种子标题
*/
getTitle() {
return $("a[href*='download.php']:first").text().trim();
}
};
(new App()).init();
}else if(/\?page\=torrents|seedwanted/.test(window.location.search)){
console.log("this is torrents.js");
class App extends window.NexusPHPCommon {
init() {
// super();
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $("#bodyarea > table > tbody > tr > td:nth-child(2) > div > .block-content > div > div > div table:nth-child(4) > tbody > tr:nth-child(2) > td > table")
.find("a[href*='download.php']")
.toArray();
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (links.length == 0) {
return this.t("getDownloadURLsFailed"); //"获取下载链接失败,未能正确定位到链接";
}
let urls = $.map(links, item => {
let link = $(item).attr("href");
if (link && link.substr(0, 4) != "http") {
link = siteURL + link;
}
return link;
});
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("#bodyarea > table > tbody > tr > td:nth-child(2) > div > .block-content > div > div > div table:nth-child(4) > tbody > tr:nth-child(2) > td > table").find(
"td:contains('MB'),td:contains('GB'),td:contains('TB'),td:contains('MiB'),td:contains('GiB'),td:contains('TiB')"
)
);
}
/**
* 下载拖放的种子
* @param {*} data
* @param {*} callback
*/
downloadFromDroper(data, callback) {
if (typeof data === "string") {
data = {
url: data,
title: ""
};
}
console.log(data);
if (!data.url) {
PTService.showNotice({
msg: this.t("invalidURL") //"无效的链接"
});
callback();
return;
}
if (data.url.substr(0, 1) === "/") {
data.url = `${location.origin}${data.url}`;
} else if (data.url.substr(0, 4) !== "http") {
data.url = `${location.origin}/${data.url}`;
}
this.sendTorrentToDefaultClient(result)
.then(result => {
callback(result);
})
.catch(result => {
callback(result);
});
}
}
new App().init();
}
})(jQuery, window);
================================================
FILE: resource/sites/springsunday.net/config.json
================================================
{
"name": "SSD",
"timezoneOffset": "+0800",
"description": "Classic Movie Compression Team",
"url": "https://springsunday.net/",
"icon": "https://springsunday.net/favicon.ico",
"tags": [
"影视",
"音乐",
"综合"
],
"schema": "NexusPHP",
"host": "springsunday.net",
"formerHosts": [
"hdcmct.org"
],
"levelRequirements": [{
"level": "1",
"name": "Power User",
"downloaded": "100GB",
"ratio": "1.1",
"seedingPoints": "20000",
"privilege": "查看NFO文档;请求续种;上传字幕或删除自己上传的字幕。"
},{
"level": "2",
"name": "Elite User",
"downloaded": "200GB",
"ratio": "1.2",
"seedingPoints": "50000",
"privilege": "查看用户列表;查看排行榜。"
},{
"level": "3",
"name": "Crazy User",
"downloaded": "500GB",
"ratio": "1.2",
"seedingPoints": "100000",
"privilege": "在做种/下载/发布的时候选择匿名模式, 浏览论坛邀请区。封存账号后不会被删除"
},{
"level": "4",
"name": "Insane User",
"downloaded": "1TB",
"ratio": "1.2",
"seedingPoints": "200000",
"privilege": "查看其它用户的种子历史"
},{
"level": "5",
"name": "Veteran User",
"downloaded": "2TB",
"ratio": "1.2",
"seedingPoints": "400000",
"privilege": "永远保留账号。免除站点常规考核"
},{
"level": "6",
"name": "Extreme User",
"downloaded": "3TB",
"ratio": "1.5",
"seedingPoints": "600000",
"privilege": "得到1个邀请名额。"
},{
"level": "7",
"name": "Ultimate User",
"downloaded": "4TB",
"ratio": "1.5",
"seedingPoints": "800000",
"privilege": "查看其它用户的评论、帖子历史。"
},{
"level": "8",
"name": "Nexus Master",
"downloaded": "5TB",
"ratio": "1.5",
"seedingPoints": "1000000",
"privilege": "得到1个邀请名额。"
},{
"level": "9",
"name": "Nexus God",
"downloaded": "11.5TB",
"ratio": "2.0",
"seedingPoints": "2300000",
"privilege": "彩色ID特权;查看普通日志;购买及发送邀请。"
}],
"searchEntry": [{
"name": "全部",
"enabled": true
},
{
"queryString": "cat501=1",
"name": "Movies(电影)",
"enabled": false
},
{
"queryString": "cat502=1",
"name": "TV Series(剧集)",
"enabled": false
},
{
"queryString": "cat503=1",
"name": "Docs(纪录)",
"enabled": false
},
{
"queryString": "cat504=1",
"name": "Animations(动画)",
"enabled": false
},
{
"queryString": "cat505=1",
"name": "TV Shows(综艺)",
"enabled": false
},
{
"queryString": "cat506=1",
"name": "Sports(体育)",
"enabled": false
},
{
"queryString": "cat507=1",
"name": "MV(音乐视频)",
"enabled": false
},
{
"queryString": "cat508=1",
"name": "Music(音乐)",
"enabled": false
},
{
"queryString": "cat509=1",
"name": "Others(其他)",
"enabled": false
}
],
"categories": [{
"entry": "*",
"result": "&cat$id$=1",
"category": [{
"id": 501,
"name": "Movies(电影)"
},
{
"id": 502,
"name": "TV Series(剧集)"
},
{
"id": 503,
"name": "Docs(纪录)"
},
{
"id": 504,
"name": "Animations(动画)"
},
{
"id": 505,
"name": "TV Shows(综艺)"
},
{
"id": 506,
"name": "Sports(体育)"
},
{
"id": 507,
"name": "MV(音乐视频)"
},
{
"id": 508,
"name": "Music(音乐)"
},
{
"id": 509,
"name": "Others(其他)"
}
]
}],
"plugins": [{
"name": "保种列表",
"pages": ["/rescue.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/NexusPHP/torrents.js"]
}],
"searchEntryConfig": {
"fieldSelector": {
"subTitle": {
"selector": ["div.torrent-smalldescr:first"],
"filters": ["query.prop('lastChild').nodeValue.trim()"]
},
"progress": {
"selector": ["a[id*='subscription'] > img"],
"filters": ["query.is('.uploading') ? 100 : query.is('.downloading') ? query.attr('title').match(/(\\d.+)%/)[1] : null"]
},
"status": {
"selector": ["a[id*='subscription'] > img"],
"filters": ["query.is('.uploading') ? 2 : query.is('.downloading') ? 1: null"]
}
}
},
"selectors": {
"userBaseInfo": {
"merge": true,
"fields": {
"messageCount": {
"selector": ["a[href*='messages.php'][style*='background: red']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
}
}
},
"bonusExtendInfo": {
"prerequisites": "!user.bonusPerHour",
"page": "/mybonus.php",
"fields": {
"seeding": {
"selector": ["td:contains('我的数据'):last", "td:contains('我的數據'):last", "td:contains('My Data'):last"],
"filters": ["parseInt(query.parent().children().eq(1).text().replace(/,/g,''))"]
},
"seedingSize": {
"selector": ["td:contains('我的数据'):last", "td:contains('我的數據'):last", "td:contains('My Data'):last"],
"filters": ["parseFloat(query.parent().children().eq(2).text().replace(/,/g,''))*1024*1024*1024"]
},
"bonusPerHour": {
"selector": ["td:contains('我的数据'):last", "td:contains('我的數據'):last", "td:contains('My Data'):last"],
"filters": ["parseFloat(query.parent().children().last().text().replace(/,/g,''))"]
}
}
}
}
}
================================================
FILE: resource/sites/sugoimusic.me/config.json
================================================
{
"name": "SugoiMusic",
"timezoneOffset": "+0800",
"description": "music",
"url": "https://sugoimusic.me/",
"icon": "https://sugoimusic.me/favicon.ico",
"tags": [
"音乐"
],
"schema": "GazelleJSONAPI",
"host": "sugoimusic.me",
"collaborator": [
"MewX"
],
"searchEntryConfig": {
"skipIMDbId": true
},
"selectors": {
"userSeedingTorrents": {
"page": "/user.php?id=$user.id$",
"merge": true,
"fields": {
"seedingSize": {
"selector": [
"li:contains('Total Seeding:') > span"
],
"filters": [
"query.text().trim().sizeToNumber()"
]
},
"bonus": {
"selector": [
"#bonus_points > span"
],
"filters": [
"query.text().trim().replace(',', '')"
]
}
}
}
},
"supportedFeatures": {
"imdbSearch": false
}
}
================================================
FILE: resource/sites/teamhd.org/config.json
================================================
{
"name": "TeamHD",
"timezoneOffset": "+0000",
"description": "俄国站",
"url": "https://teamhd.org/",
"tags": ["影视"],
"schema": "Common",
"plugins": [{
"name": "种子详情页面",
"pages": ["/details/"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/details.js"]
}, {
"name": "种子列表",
"pages": ["/browse"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/torrents.js"]
}],
"host": "teamhd.org",
"searchEntryConfig": {
"page": "/browse?search=$key$",
"loggedRegex": "/logout.php",
"resultType": "html",
"resultSelector": ".table.table-borderless.table-hover.browse",
"fieldIndex": {
"category": 0,
"title": 1,
"link": 1,
"url": 1,
"comments": 2,
"time": 1,
"size": 4,
"author": 4,
"seeders": 3,
"leechers": 3,
"completed": 4
},
"fieldSelector": {
"title": {
"selector": ["a"],
"filters": ["query.text()"]
},
"link": {
"selector": ["a"],
"filters": ["query.attr('href')", "'https://teamhd.org/'+query"]
},
"url": {
"selector": ["a[href*='download.php?id=']"],
"filters": ["query.attr('href')", "'https://teamhd.org/'+query"]
},
"time": {
"selector": ["small"]
},
"size": {
"selector": ["br"],
"filters": ["$(query[0].previousSibling).text().replace(/,/g,'').sizeToNumber()"]
},
"completed": {
"selector": ["strong"],
"filters": ["query.text()"]
},
"leechers": {
"selector": [""],
"filters": ["query.text().split('|')[1]"]
},
"progress": {
"selector": ["div.seeder"],
"filters": ["query.length>0?100:undefined"]
},
"status": {
"selector": ["div.seeder"],
"filters": ["query.length>0?2:undefined"]
}
}
},
"searchEntry": [{
"name": "全部",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "a[href*='/details'][style='color:#f2b101']"
}],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"name": {
"selector": "a[href*='/user/']:first"
},
"id": {
"selector": "a[href*='/user/']",
"filters": ["query[0].href.split('/')[4]"]
},
"isLogged": {
"selector": ["a[href='/logout.php']"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["#message_box > a > font"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
},
"uploaded": {
"selector": ["div.col-8.mb-4 > font[color='green']"],
"filters": ["$(query[0].nextSibling).text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["div.col-8.mb-4 > font[color='darkred']"],
"filters": ["$(query[0].nextSibling).text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"ratio": {
"selector": ["div.col-8.mb-4 > font[color='#1900D1']"],
"filters": ["$(query[0].nextSibling).text()"]
},
"bonus": {
"selector": ["a.online[href='/mybonus.php']"],
"filters": ["parseFloat(query.text().replaceAll(' ',''))"]
}
}
},
"userExtendInfo": {
"page": "/user/$user.id$",
"fields": {
"joinTime": {
"selector": ["#profile_right > table.inlay > tbody > tr:nth-child(1) > td:nth-child(2)"],
"filters": [
"query.text().split('(')[0].trim()",
"query.replace('января', 'January')",
"query.replace('февраля', 'February')",
"query.replace('марта', 'March')",
"query.replace('апреля', 'April')",
"query.replace('мая', 'May')",
"query.replace('июня', 'June')",
"query.replace('июля', 'July')",
"query.replace('августа', 'August')",
"query.replace('сентября', 'September')",
"query.replace('октября', 'October')",
"query.replace('ноября', 'November')",
"query.replace('декабря', 'December')",
"dateTime(query).valueOf()"
]
},
"levelName": {
"selector": ["#profile_left > table > tbody > tr > td:nth-child(2) > p:nth-child(1) > u > span"],
"filters": ["query.text()"]
}
}
},
"userSeedingTorrents": {
"page": "/bprate.php",
"fields": {
"seeding": {
"selector": ["table.table:first > tbody > tr > td:nth-child(1)"],
"filters": ["parseInt(query.text())"]
},
"seedingSize": {
"selector": ["table.table:first > tbody > tr > td:nth-child(2)"],
"filters": ["_self.getTotalSize([query.text()])"]
}
}
},
"common": {
"page": "/torrents-details.php",
"fields": {
"downloadURL": {
"selector": ["a[href*='download.php?']"],
"filters": ["query.attr('href')"]
},
"size": {
"selector": ["td[align='left']:contains('Total Size:') + td"],
"filters": ["query.parent().text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"]
},
"downloadURLs": {
"selector": ["a[href*='download.php?id=']"],
"filters": ["query.toArray()"]
},
"confirmSize": {
"selector": ["table.ttable_headinner"],
"filters": ["query.find('td.ttable_size')"]
}
}
}
}
}
================================================
FILE: resource/sites/thegeeks.click/config.json
================================================
{
"name": "TG",
"timezoneOffset": "+0000",
"description": "TheGeeks",
"url": "https://thegeeks.click",
"icon": "https://thegeeks.click/favicon.ico",
"tags": ["学习"],
"schema": "",
"host": "thegeeks.click",
"selectors": {
"userBaseInfo": {
"page": "/main.php",
"fields": {
"id": {
"selector": ["a[href*='userdetails.php?id=']:first"],
"attribute": "href",
"filters": ["query ? query.getQueryString('id'):''"]
},
"name": {
"selector": ["a[href*='userdetails.php?id=']:first"]
},
"messageCount": {
"selector": ["a[href='message.php?action=viewmailbox'] + b"],
"filters": ["query.text().match(/(\\d+ New)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
},
"isLogged": {
"selector": ["a[href*='logout.php']"],
"filters": ["query.length>0"]
},
"uploaded": {
"selector": ["td.statuslink span:contains('UL:'):first"],
"filters": ["query[0].nextSibling.nodeValue.trim().replace(/,/g,'').sizeToNumber()"]
},
"downloaded": {
"selector": ["td.statuslink span:contains('DL:'):first"],
"filters": ["query[0].nextSibling.nodeValue.trim().replace(/,/g,'').sizeToNumber()"]
},
"ratio": {
"selector": "td.statuslink span:contains('Ratio:') + span",
"filters": ["query.text().replace(/,/g,'')", "query === '---' ? 'N/A' : parseFloat(query)"]
},
"seeding": {
"selector": ["img[title='seeders'] + span:first"]
},
"seedingSize": {
"value": -1
},
"levelName": {
"selector": ["a[href*='userdetails.php?id='] + span:first"],
"filters": ["query.text().replace(/\\(|\\)/g, '')"]
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"bonus": {
"value": "N/A"
},
"joinTime": {
"selector": [".embedded td:contains('Join date') + td:first"],
"filters": ["query.text().replace(/\\(.*\\)/g, '').trim()", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
}
}
}
},
"supportedFeatures": {
"userData": true,
"search": false,
"imdbSearch": false,
"sendTorrent": false
}
}
================================================
FILE: resource/sites/tjupt.org/config.json
================================================
{
"name": "北洋园",
"timezoneOffset": "+0800",
"description": "北洋园PT",
"url": "https://tjupt.org/",
"icon": "https://tjupt.org/favicon.ico",
"tags": [
"教育网",
"影视",
"综合"
],
"schema": "NexusPHP",
"host": "tjupt.org",
"collaborator": ["tongyifan", "echo094"],
"levelRequirements": [
{
"level": 1,
"name": "拜师学艺",
"interval": "4",
"downloads": "20",
"seedingTime": "30",
"uploaded": "50GB",
"bonus": "10000",
"privilege": "查看用户列表;请求续种;查看其他用户种子历史(隐私等级不为高时);删除自己上传的字幕。"
},
{
"level": 2,
"name": "持剑下山",
"interval": "8",
"downloads": "60",
"seedingTime": "120",
"uploaded": "200GB",
"bonus": "30000",
"privilege": "封存账号后不会被删除。"
},
{
"level": 3,
"name": "初入江湖",
"interval": "16",
"downloads": "150",
"seedingTime": "450",
"uploaded": "800GB",
"uploads": "1",
"bonus": "80000",
"privilege": "首次升级至此等级时将获得1个永久邀请;发送邀请;做种/下载/发布时可以选择匿名。"
},
{
"level": 4,
"name": "小有名气",
"interval": "28",
"downloads": "300",
"seedingTime": "1500",
"uploaded": "2000GB",
"uploads": "5",
"bonus": "150000",
"privilege": "首次升级至此等级时将获得1个永久邀请;查看普通日志。"
},
{
"level": 5,
"name": "威震一方",
"interval": "48",
"downloads": "600",
"seedingTime": "4200",
"uploaded": "5000GB",
"uploads": "10",
"bonus": "300000",
"privilege": "首次升级至此等级时将获得1个永久邀请;查看其它用户的评论、帖子历史;永久保留账号。"
},
{
"level": 6,
"name": "横扫群雄",
"interval": "72",
"downloads": "1000",
"seedingTime": "28000",
"uploaded": "10000GB",
"uploads": "15",
"bonus": "400000",
"privilege": "首次升级至此等级时将获得1个永久邀请。"
},
{
"level": 7,
"name": "开宗立派",
"interval": "100",
"downloads": "1800",
"seedingTime": "90000",
"uploaded": "20000GB",
"uploads": "30",
"bonus": "600000",
"privilege": "首次升级至此等级时将获得2个永久邀请。"
},
{
"level": 8,
"name": "天下无敌",
"interval": "132",
"downloads": "3000",
"seedingTime": "300000",
"uploads": "50",
"uploaded": "50000GB",
"bonus": "1000000",
"privilege": "首次升级至此等级时将获得3个永久邀请。"
}
],
"searchEntry": [{
"name": "全站",
"enabled": true
},
{
"queryString": "cat401=1",
"name": "电影",
"enabled": false
},
{
"queryString": "cat403=1",
"name": "综艺",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "资料",
"enabled": false
},
{
"queryString": "cat405=1",
"name": "动漫",
"enabled": false
},
{
"queryString": "cat406=1",
"name": "音乐",
"enabled": false
},
{
"queryString": "cat407=1",
"name": "音乐",
"enabled": false
},
{
"queryString": "cat408=1",
"name": "软件",
"enabled": false
},
{
"queryString": "cat409=1",
"name": "游戏",
"enabled": false
},
{
"queryString": "cat411=1",
"name": "纪录片",
"enabled": false
},
{
"queryString": "cat412=1",
"name": "移动视频",
"enabled": false
},
{
"queryString": "cat410=1",
"name": "其他",
"enabled": false
}
],
"categories": [{
"entry": "*",
"result": "&cat$id$=1",
"category": [{
"id": 401,
"name": "电影"
},
{
"id": 402,
"name": "剧集"
},
{
"id": 403,
"name": "综艺"
},
{
"id": 404,
"name": "资料"
},
{
"id": 405,
"name": "动漫"
},
{
"id": 406,
"name": "音乐"
},
{
"id": 407,
"name": "体育"
},
{
"id": 408,
"name": "软件"
},
{
"id": 409,
"name": "游戏"
},
{
"id": 411,
"name": "纪录片"
},
{
"id": 412,
"name": "移动视频"
},
{
"id": 410,
"name": "其他"
}
]
}],
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["div.probar_b1, div.probar_b2, div.probar_b3"],
"filters": ["query.attr('style')||''", "query.match(/width:([ \\d.]+)%/)", "(query && query.length>=2)?query[1]:null"]
},
"status": {
"selector": ["div.probar_b1", "div.probar_b2", "div.probar_b3"],
"switchFilters": [
["1"],
["2"],
["255"]
]
}
}
},
"selectors": {
"userExtendInfo": {
"merge": true,
"fields": {
"uploaded": {
"selector": [".color_uploaded"],
"filters": ["$(query[0].nextSibling).text().trim().sizeToNumber()"]
}
}
},
"userSeedingTorrents": {
"merge": true,
"fields": {
"seeding": {
"selector": ["b:first"],
"filters": ["query.text().trim()"]
},
"seedingSize": {
"selector": ["b:first"],
"filters": ["$(query[0].nextSibling).text().trim().match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length==2)?(query[0]).sizeToNumber():0"]
}
}
},
"levelExtendInfo": {
"page": "/classes.php",
"fields": {
"downloads": {
"selector": ["#9 td:eq(1) li:eq(1)"],
"filters": ["parseInt(query.text().trim().split(':')[1].split('/')[0])"]
},
"seedingTime": {
"selector": ["#9 td:eq(1) li:eq(2)"],
"filters": ["parseFloat(query.text().trim().split(':')[1].split('/')[0])"]
},
"uploads": {
"selector": ["#9 td:eq(1) li:eq(4)"],
"filters": ["parseInt(query.text().trim().split(':')[1].split('/')[0])"]
}
}
},
"/details.php": {
"merge": true,
"fields": {
"downloadURL": {
"selector": ["a#direct_link"],
"filters": ["query.attr('data-clipboard-text')"]
}
}
}
},
"cdn": ["https://tjupt.org/","https://www.tjupt.org/"]
}
================================================
FILE: resource/sites/totheglory.im/bookmarks.js
================================================
(function($) {
console.log("this is bookmarks.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons(true);
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $("a.dl_a").toArray();
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (links.length == 0) {
return this.t("getDownloadURLsFailed"); //"获取下载链接失败,未能正确定位到链接";
}
let urls = $.map(links, item => {
let link = $(item).attr("href");
if (link && link.substr(0, 4) != "http") {
link = siteURL + link;
}
return link;
});
return urls;
}
/**
* 执行指定的操作
* @param {*} action 需要执行的执令
* @param {*} data 附加数据
* @return Promise
*/
call(action, data) {
return new Promise((resolve, reject) => {
switch (action) {
// 从当前的DOM中获取下载链接地址
case PTService.action.downloadFromDroper:
this.downloadFromDroper(data, () => {
resolve();
});
break;
}
});
}
/**
* 下载拖放的种子
* @param {*} data
* @param {*} callback
*/
downloadFromDroper(data, callback) {
if (typeof data === "string") {
data = {
url: data,
title: ""
};
}
console.log(data);
if (!data.url) {
PTService.showNotice({
msg: this.t("invalidURL") //"无效的链接"
});
callback();
return;
}
if (data.url.substr(0, 1) === "/") {
data.url = `${location.origin}${data.url}`;
} else if (data.url.substr(0, 4) !== "http") {
data.url = `${location.origin}/${data.url}`;
}
this.sendTorrentToDefaultClient(result)
.then(result => {
callback(result);
})
.catch(result => {
callback(result);
});
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("#torrent_table").find(
"td[align='center']:contains('MB'),td[align='center']:contains('GB'),td[align='center']:contains('TB')"
)
);
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/totheglory.im/browse.js
================================================
(function($) {
console.log("this is browse.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons(true);
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $("a.bookmark").toArray();
let urls = $.map(links, item => {
let id = $(item).attr("tid");
return this.getDownloadURL(id);
});
if (links.length == 0) {
return "获取下载链接失败,未能正确定位到链接";
}
return urls;
}
getDownloadURL(id) {
// 格式:vvvid|||passkeyzz
let key = new Base64().encode(
"vvv" + id + "|||" + PTService.site.passkey + "zz"
);
return `https://${PTService.site.host}/rssdd.php?par=${key}&ssl=yes`;
}
/**
* 执行指定的操作
* @param {*} action 需要执行的执令
* @param {*} data 附加数据
* @return Promise
*/
call(action, data) {
return new Promise((resolve, reject) => {
switch (action) {
// 从当前的DOM中获取下载链接地址
case PTService.action.downloadFromDroper:
this.downloadFromDroper(data, () => {
resolve();
});
break;
}
});
}
/**
* 下载拖放的种子
* @param {*} data
* @param {*} callback
*/
downloadFromDroper(data, callback) {
if (!PTService.site.passkey) {
PTService.showNotice({
msg: "请先设置站点密钥(Passkey)。"
});
callback();
return;
}
if (typeof data === "string") {
data = {
url: data,
title: ""
};
}
let result = this.getDroperURL(data.url);
if (!result) {
callback();
return;
}
this.sendTorrentToDefaultClient(result)
.then(result => {
callback(result);
})
.catch(result => {
callback(result);
});
}
/**
* 获取有效的拖放地址
* @param {*} url
*/
getDroperURL(url) {
let values = url.split("/");
let id = values[values.length - 2];
let result = this.getDownloadURL(id);
return result;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("#torrent_table").find(
"td[align='center']:contains('MB'),td[align='center']:contains('GB'),td[align='center']:contains('TB')"
)
);
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/totheglory.im/config.json
================================================
{
"name": "TTG",
"timezoneOffset": "+0800",
"description": "ToTheGlory",
"url": "https://totheglory.im/",
"icon": "https://totheglory.im/favicon.ico",
"tags": ["影视", "音乐", "游戏", "综合"],
"schema": "TTG",
"plugins": [{
"name": "种子详情页面",
"pages": ["^/t/(\\d+)/$", "/details.php"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["/browse.php"],
"scripts": ["/schemas/NexusPHP/common.js", "browse.js"]
}, {
"name": "收藏列表",
"pages": ["/bookmarks.php"],
"scripts": ["/schemas/NexusPHP/common.js", "bookmarks.js"]
}],
"host": "totheglory.im",
"levelRequirements": [{
"level": "1",
"name": "KiloByte",
"interval": "5",
"downloaded": "60GB",
"ratio": "1.1",
"privilege": "可申请种子候选"
},{
"level": "2",
"name": "MegaByte",
"interval": "8",
"downloaded": "150GB",
"ratio": "2.0",
"privilege": "无"
},{
"level": "3",
"name": "GigaByte",
"interval": "8",
"downloaded": "250GB",
"ratio": "2.0",
"privilege": "可挂起,可进入积分商城"
},{
"level": "4",
"name": "TeraByte",
"interval": "8",
"downloaded": "500GB",
"ratio": "2.5",
"privilege": "可用积分购买邀请,并可浏览全站(新加游戏分类页),可以访问邀请区"
},{
"level": "5",
"name": "PetaByte",
"interval": "15",
"downloaded": "750GB",
"ratio": "2.5",
"privilege": "可直接发布种子"
},{
"level": "6",
"name": "ExaByte",
"interval": "24",
"downloaded": "1TB",
"ratio": "3.0",
"privilege": "自行挂起账号后不会被清除"
},{
"level": "7",
"name": "ZettaByte",
"interval": "24",
"downloaded": "1.5TB",
"ratio": "3.5",
"privilege": "无"
},{
"level": "8",
"name": "YottaByte",
"interval": "24",
"downloaded": "2.5TB",
"ratio": "4.0",
"privilege": "可查看排行榜"
},{
"level": "9",
"name": "BrontoByte",
"interval": "32",
"downloaded": "3.5TB",
"ratio": "5.0",
"privilege": "永远保留账号"
},{
"level": "10",
"name": "NonaByte",
"interval": "48",
"downloaded": "5TB",
"ratio": "6.0",
"privilege": "无"
},{
"level": "11",
"name": "DoggaByte",
"interval": "48",
"downloaded": "10TB",
"ratio": "6.0",
"privilege": "无"
}],
"searchEntryConfig": {
"page": "/browse.php",
"queryString": "search_field=$key$",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "table#torrent_table:last > tbody > tr",
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"replaceKey": [
"tt", "IMDB"
]
}],
"fieldSelector": {
"progress": {
"selector": ["div.process > span"],
"filters": ["query.attr('style')||''", "query.match(/width:.?(\\d.+)%/)", "(query && query.length>=2)?query[1]:null"]
},
"status": {
"selector": ["div.process > span"],
"filters": ["query.attr('style')||''", "query.match(/width:.?(\\d.+)%/)", "(query && query.length>=2)?query[1]:0", "parseInt(query)==100?2:1"]
}
}
},
"searchEntry": [{
"appendQueryString": "&c=M",
"name": "影视&音乐",
"enabled": true
}, {
"appendQueryString": "&c=G",
"name": "游戏&软件",
"enabled": true
}],
"categories": [{
"entry": "browse.php?c=M",
"appendToSearchKey": true,
"result": "分类:`$id$` ",
"category": [{
"id": "电影DVDRip",
"name": "电影DVDRip"
}, {
"id": "电影720p",
"name": "电影720p"
}, {
"id": "电影1080i/p",
"name": "电影1080i/p"
}, {
"id": "BluRay原盘",
"name": "BluRay原盘"
}, {
"id": "影视2160p",
"name": "影视2160p"
}, {
"id": "UHD原盘",
"name": "UHD原盘"
}, {
"id": "纪录片720p",
"name": "纪录片720p"
}, {
"id": "纪录片1080i/p",
"name": "纪录片1080i/p"
}, {
"id": "纪录片BluRay原盘",
"name": "纪录片BluRay原盘"
}, {
"id": "欧美剧720p",
"name": "欧美剧720p"
}, {
"id": "欧美剧1080i/p",
"name": "欧美剧1080i/p"
}, {
"id": "高清日剧",
"name": "高清日剧"
}, {
"id": "大陆港台剧1080i/p",
"name": "大陆港台剧1080i/p"
}, {
"id": "大陆港台剧720p",
"name": "大陆港台剧720p"
}, {
"id": "高清韩剧",
"name": "高清韩剧"
}, {
"id": "欧美剧包",
"name": "欧美剧包"
}, {
"id": "日剧包",
"name": "日剧包"
}, {
"id": "华语剧包",
"name": "华语剧包"
}, {
"id": "韩剧包",
"name": "韩剧包"
}, {
"id": "(电影原声&Game)OST",
"name": "(电影原声&Game)OST"
}, {
"id": "无损音乐FLAC&APE",
"name": "无损音乐FLAC&APE"
}, {
"id": "MV&演唱会",
"name": "MV&演唱会"
}, {
"id": "高清体育节目",
"name": "高清体育节目"
}, {
"id": "高清动漫",
"name": "高清动漫"
}, {
"id": "韩国综艺",
"name": "韩国综艺"
}, {
"id": "高清综艺",
"name": "高清综艺"
}, {
"id": "日本综艺",
"name": "日本综艺"
}, {
"id": "MiniVideo",
"name": "MiniVideo"
}, {
"id": "补充音轨",
"name": "补充音轨"
}, {
"id": "iPhone/iPad视频",
"name": "iPhone/iPad视频"
}]
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "img[alt='free']"
}, {
"name": "30%",
"selector": "img[alt='30%']"
}, {
"name": "50%",
"selector": "img[alt='50%']"
}, {
"name": "⛔️",
"selector": "span.browse.excl"
}],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": "a[href*='userdetails.php']:first",
"attribute": "href",
"filters": ["query ? query.getQueryString('id'):''"]
},
"name": {
"selector": "a[href*='userdetails.php']:first"
},
"isLogged": {
"selector": ["a[href*='logout.php']"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["td[style*='background'] > b > a[href*='messages.php'], a[href='#notice']"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": ["td.rowhead:contains('上传量') + td", "td.rowhead:contains('上傳量') + td"],
"filters": ["query.text().replace(/,/g,'').sizeToNumber()"]
},
"downloaded": {
"selector": ["td.rowhead:contains('下载量') + td", "td.rowhead:contains('下載量') + td"],
"filters": ["query.text().replace(/,/g,'').sizeToNumber()"]
},
"ratio": {
"selector": "td.rowhead:contains('分享率') + td",
"filters": ["parseFloat(query.text())"]
},
"levelName": {
"selector": ["td.rowhead:contains('等级') + td", "td.rowhead:contains('等級') + td"]
},
"bonus": {
"selector": ["td.rowhead:contains('积分') + td", "td.rowhead:contains('積分') + td"],
"filters": ["parseFloat(query.text())"]
},
"joinTime": {
"selector": ["td.rowhead:contains('注册日期') + td", "td.rowhead:contains('註冊日期') + td"],
"filters": ["dateTime(query.text()).isValid()?dateTime(query.text()).valueOf():query.text()"]
},
"seeding": {
"selector": ["div#ka2 tr:not(:eq(0))"],
"filters": ["query.length"]
},
"seedingSize": {
"selector": ["div#ka2 tr:not(:eq(0))"],
"filters": ["jQuery.map(query.find('td:eq(3)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
}
}
},
"bonusExtendInfo": {
"page": "/mybonus.php",
"fields": {
"bonusPerHour": {
"selector": ["td.rowhead:contains('总计') + td"],
"filters": ["parseFloat(query.text().match(/[\\d.]+/)[0])"]
}
}
},
"common": {
"fields": {
"size": {
"selector": ["td[valign='top'][align='left']:contains('字节')"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"]
}
}
}
}
}
================================================
FILE: resource/sites/totheglory.im/details.js
================================================
(function ($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.showTorrentSize();
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
// 有一些扩展会为链接添加class,导致选择器失效,因此使用正则来获取链接
// let query = $("a[href*='/dl/']:not([class])");
let query = $("a[href*='/dl/']").filter(function() {
return this.href.match(/\/[0-9a-f]{32}$/)
});
let url = "";
if (query.length > 0) {
url = query.attr("href");
// 直接获取的链接下载成功率很低
// 如果设置了 passkey 则使用 rss 订阅的方式下载
if (PTService.site.passkey) {
let values = url.split("/");
let id = values[values.length - 2];
// 格式:vvvid|||passkeyzz
let key = (new Base64).encode("vvv" + id + "|||" + PTService.site.passkey + "zz");
url = `https://${PTService.site.host}/rssdd.php?par=${key}&ssl=yes`;
}
}
return url;
}
showTorrentSize() {
let query = $("td[valign='top'][align='left']:contains('字节')");
let size = "";
if (query.length > 0) {
size = query.text().split(" (")[0];
// attachment
PTService.addButton({
title: "当前种子大小",
icon: "attachment",
label: size
});
}
}
getTitle() {
return /"(.*?)"/.exec($("title").text())[1];
}
}
(new App()).init();
})(jQuery, window);
================================================
FILE: resource/sites/totheglory.im/getSearchResult.js
================================================
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
if (/takelogin\.php/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
if (
/没有种子|No [Tt]orrents?|Your search did not match anything|用准确的关键字重试/.test(
options.responseText
)
) {
options.status = ESearchResultParseStatus.noTorrents;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
if (!this.haveData) {
return [];
}
let results = [];
let site = options.site;
// 获取种子列表行
let rows = options.page.find(
options.resultSelector || "table#torrent_table:last > tbody > tr"
);
let time_regex = /(\d{4}-\d{2}-\d{2}[^\d]+?\d{2}:\d{2}:\d{2})/;
let time_regen_replace = /-(\d{2})[^\d]+?(\d{2}):/;
// 用于定位每个字段所列的位置
let fieldIndex = {
// 时间
time: 4,
// 大小
size: 6,
// 上传人数
seeders: 8,
// 下载人数
leechers: 8,
// 完成人数
completed: 7,
// 评论人数
comments: 3,
// 发布人
author: 9,
category: 0
};
if (site.url.substr(-1) == "/") {
site.url = site.url.substr(0, site.url.length - 1);
}
// 遍历数据行
for (let index = 1; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = row.find("div.name_left > a");
if (title.length == 0) {
continue;
}
// 对title进行处理,防止出现cf的email protect
if (title.find("span.__cf_email__")) {
title.find("span.__cf_email__").each(function() {
$(this).replaceWith(
Searcher.cfDecodeEmail($(this).data("cfemail"))
);
});
}
let titleStrings = title.html().split(" ");
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
let values = link.split("/");
let id = values[values.length - 2];
let url = "";
if (site.passkey && id) {
// 格式:vvvid|||passkeyzz
let key = new Base64().encode(
"vvv" + id + "|||" + site.passkey + "zz"
);
url = `https://${site.host}/rssdd.php?par=${key}&ssl=yes`;
} else {
url = row.find("a.dl_a").attr("href");
if (url && url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
}
if (!url) {
continue;
}
let subTitle = "";
if (titleStrings.length > 0) {
subTitle = $("")
.html(titleStrings[1])
.text();
}
let data = {
title: $("")
.html(titleStrings[0])
.text(),
subTitle: subTitle || "",
link,
url: url,
size: cells.eq(fieldIndex.size).html() || 0,
time:
cells
.eq(fieldIndex.time)
.html()
.match(time_regex)[1]
.replace(time_regen_replace, "-$1 $2:") ||
cells.eq(fieldIndex.time).text(),
author: cells.eq(fieldIndex.author).text() || "",
seeders:
cells
.eq(fieldIndex.seeders)
.text()
.split("/")[0] || 0,
leechers:
cells
.eq(fieldIndex.leechers)
.text()
.split("/")[1] || 0,
completed: cells.eq(fieldIndex.completed).text() || 0,
comments: cells.eq(fieldIndex.comments).text() || 0,
site: site,
entryName: options.entry.name,
category: this.getCategory(cells.eq(fieldIndex.category)),
tags: options.searcher.getRowTags(site, row),
progress: options.searcher.getFieldValue(site, row, "progress"),
status: options.searcher.getFieldValue(site, row, "status"),
imdbId: this.getIMDbId(row)
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
}
return results;
}
/**
* 获取IMDbId
* @param {*} row
*/
getIMDbId(row)
{
try {
let link = row.find("a[href*='imdb.com/title/tt']").first().attr("href");
if (link)
{
let imdbId = link.match(/(tt\d+)/);
if (imdbId)
return imdbId[0];
}
} catch (error){
console.log(error)
return null;
}
return null;
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: "",
link: ""
};
let link = cell.find("a:first");
let img = link.find("img:first");
result.link = link.attr("href");
if (result.link.substr(0, 4) !== "http") {
result.link = options.site.url + result.link;
}
result.name = img.attr("alt");
return result;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, options.searcher);
================================================
FILE: resource/sites/totheglory.im/parser/downloadURL.js
================================================
(function (options) {
if (options.url && options.url.href) {
if (!/(\/t\/(\d+)|\/dl\/(\d+)\/(\d+))/.test(options.url.href)) {
options.error = {
success: false,
msg: "无效的下载地址"
}
return;
}
// 匹配直接下载地址
if (/\/dl\/(\d+)\/(\d+)/.test(options.url.href)) {
options.result = options.url.href;
return;
}
// 匹配种子详细页面地址
let id_match = options.url.href.match(/\/t\/(\d+)/);
let passkey = options.site.passkey;
if (passkey) {
let id = id_match[1];
// 格式:vvvid|||passkeyzz
let key = (new Base64).encode("vvv" + id + "|||" + options.site.passkey + "zz");
options.result = `https://${options.site.host}/rssdd.php?par=${key}&ssl=yes`;
} else {
options.error = {
success: false,
msg: "请先设置站点的passkey"
}
}
} else {
options.error = {
success: false,
msg: "无效的下载地址"
}
}
})(options)
================================================
FILE: resource/sites/u2.dmhy.org/config.json
================================================
{
"name": "U2",
"timezoneOffset": "+0800",
"description": "动漫花园分享园",
"url": "https://u2.dmhy.org/",
"icon": "https://u2.dmhy.org/favicon.ico",
"tags": [
"影视",
"动漫"
],
"schema": "NexusPHP",
"host": "u2.dmhy.org",
"levelRequirements": [{
"level": "1",
"name": "御宅族",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"privilege": "查看会员列表; 请求补种; 查看普通日志; 使用流量信息条"
},{
"level": "2",
"name": "宅修士",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"privilege": "无"
},{
"level": "3",
"name": "宅教士",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.55",
"privilege": "无"
},{
"level": "4",
"name": "宅传教士",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"privilege": "无"
},{
"level": "5",
"name": "宅护法",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"privilege": "使用邀请名额; 无可用邀请时,购买邀请"
},{
"level": "6",
"name": "宅贤者",
"interval": "60",
"downloaded": "1024GB",
"ratio": "3.55",
"privilege": "无"
},{
"level": "7",
"name": "宅圣",
"interval": "80",
"downloaded": "1536GB",
"ratio": "4.05",
"privilege": "账号封存后永久保留."
},{
"level": "8",
"name": "宅神",
"interval": "100",
"downloaded": "3072GB",
"ratio": "4.55",
"privilege": "账号永久保留"
}],
"searchEntryConfig": {
"merge": true,
"skipIMDbId": true,
"fieldSelector": {
"progress": {
"selector": ["td[class*='seedhlc_']", "td[class*='leechhlc_']", ""],
"switchFilters": [
["100"],
["query[0].innerHTML.split(' ')[1]"],
["null"]
]
},
"status": {
"selector": ["td[class*='seedhlc_ever']", ".seedhlc_current", ".leechhlc_inactive", ".leechhlc_current"],
"switchFilters": [
["255"],
["2"],
["3"],
["1"]
]
},
"leechers": {
"selector": [""],
"filters": ["query.get(0).firstChild", "query.nodeValue||query.innerText||0"]
}
}
},
"searchEntry": [{
"name": "全站",
"enabled": true
},
{
"queryString": "cat9=1",
"name": "U2-Rip",
"enabled": false
},
{
"queryString": "cat411=1",
"name": "U2-RBD",
"enabled": false
},
{
"queryString": "cat10=1",
"name": "R3TRAW",
"enabled": false
},
{
"queryString": "cat11=1",
"name": "R2JRAW",
"enabled": false
},
{
"queryString": "cat12=1",
"name": "BDRip",
"enabled": false
},
{
"queryString": "cat13=1",
"name": "DVDRip",
"enabled": false
},
{
"queryString": "cat14=1",
"name": "HDTVRip",
"enabled": false
},
{
"queryString": "cat15=1",
"name": "DVDISO",
"enabled": false
},
{
"queryString": "cat16=1",
"name": "BDMV",
"enabled": false
},
{
"queryString": "cat17=1",
"name": "LQRip",
"enabled": false
},
{
"queryString": "cat410=1",
"name": "外挂结构",
"enabled": false
},
{
"queryString": "cat412=1",
"name": "加流重灌",
"enabled": false
},
{
"queryString": "cat21=1",
"name": "Raw Books",
"enabled": false
},
{
"queryString": "cat22=1",
"name": "港译漫画",
"enabled": false
},
{
"queryString": "cat23=1",
"name": "台译漫画",
"enabled": false
},
{
"queryString": "cat30=1",
"name": "Lossless Music",
"enabled": false
},
{
"queryString": "cat40=1",
"name": "Others",
"enabled": false
}
],
"categories": [{
"entry": "*",
"result": "cat$id$=1",
"category": [{
"id": 9,
"name": "U2-Rip"
},
{
"id": 411,
"name": "U2-RBD"
},
{
"id": 10,
"name": "R3TRAW"
},
{
"id": 11,
"name": "R2JRAW"
},
{
"id": 12,
"name": "BDRip"
},
{
"id": 13,
"name": "DVDRip"
},
{
"id": 14,
"name": "HDTVRip"
},
{
"id": 15,
"name": "DVDISO"
},
{
"id": 16,
"name": "BDMV"
},
{
"id": 17,
"name": "LQRip"
},
{
"id": 410,
"name": "外挂结构"
},
{
"id": 412,
"name": "加流重灌"
},
{
"id": 21,
"name": "Raw Books"
},
{
"id": 22,
"name": "港译漫画"
},
{
"id": 23,
"name": "台译漫画"
},
{
"id": 30,
"name": "Lossless Music"
},
{
"id": 40,
"name": "Others"
}
]
}],
"selectors": {
"userExtendInfo": {
"merge": true,
"fields": {
"bonus": {
"selector": ["td.rowhead:contains('UCoin') + td"],
"filters": ["query.text().replace(/,/g,'').match(/\\(([\\d.]+)/)", "(query && query.length>=2)?parseFloat(query[1]):null"]
}
}
},
"bonusExtendInfo": {
"page": "/mprecent.php?user=$user.id$",
"fields": {
"bonusPerHour": {
"selector": ["#outer > table.main td.embedded table td.text"],
"filters": ["query.contents().filter(function() {return this.nodeType == 3;}).text()",
"query.match(/\\d+[.,]\\d+/)",
"query ? parseFloat(query[0].replace(/,/g, '.')) / 24 : null"]
}
}
},
"/details.php": {
"merge": true,
"fields": {
"sayThanksButton": {
"selector": ["span#thanksbutton input:button:first:not(:disabled)"],
"filters": ["query"]
}
}
}
}
}
================================================
FILE: resource/sites/ubits.club/config.json
================================================
{
"name": "UBits",
"timezoneOffset": "+0800",
"description": "ubits.club",
"url": "https://ubits.club/",
"icon": "https://ubits.club/favicon.ico",
"tags": ["影视"],
"schema": "NexusPHP",
"host": "ubits.club",
"collaborator": ["IITII"],
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "5",
"downloaded": "200GB",
"seedingPoints": "80000",
"ratio": "2",
"privilege": "可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\");可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "10",
"downloaded": "500G",
"seedingPoints": "150000",
"ratio": "3",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "800G",
"seedingPoints": "300000",
"ratio": "4",
"privilege": "得到1个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"seedingPoints": "650000",
"interval": "20",
"downloaded": "1T",
"ratio": "5",
"privilege": "得到1个邀请名额;可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "25",
"downloaded": "1.5T",
"seedingPoints": "1000000",
"ratio": "6",
"privilege": "得到1个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "30",
"seedingPoints": "2000000",
"downloaded": "2T",
"ratio": "7",
"privilege": "得到2个邀请名额;可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "40",
"seedingPoints": "3000000",
"downloaded": "3T",
"ratio": "8",
"privilege": "得到3个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"seedingPoints": "5000000",
"interval": "60",
"downloaded": "4T",
"ratio": "10",
"privilege": "得到4个邀请名额。"
}
],
"searchEntry": [
{
"name": "全站",
"enabled": true
}
],
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"],
"filters": ["query ? parseFloat(query.attr('title').match(/[\\d.]+/)) : null"]
},
"status": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"],
"filters": [
"query ? query.attr('title') : ''",
"query.indexOf('seeding') != -1 ? 2 : query.indexOf('leeching') != -1 ? 1 : query.indexOf('100%') != -1 ? 255 : 3"
]
}
}
},
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/uhdbits.org/config.json
================================================
{
"name": "UHDBits",
"timezoneOffset": "+0000",
"description": "HD",
"icon": "https://uhdbits.org/favicon.ico",
"schema": "GazelleJSONAPI",
"tags": ["影视"],
"url": "https://uhdbits.org/",
"collaborator": ["bimzcy", "enigamz"],
"host": "uhdbits.org",
"searchEntryConfig": {
"page": "/torrents.php",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"queryString": "searchstr=$key$&group_results=0&searchsubmit=1",
"asyncParse": false,
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"replaceKey": ["tt", ""],
"queryString": "imdbid=$key$&group_results=0&searchsubmit=1"
}]
},
"searchEntry": [{
"name": "all",
"enabled": true
},
{
"queryString": "filter_cat[1]=1",
"name": "Movie",
"enabled": false
},
{
"queryString": "filter_cat[2]=1",
"name": "Music",
"enabled": false
},
{
"queryString": "filter_cat[3]=1",
"name": "TV",
"enabled": false
}
],
"categories": [{
"entry": "*",
"result": "&filter_cat[$id$]=1",
"category": [{
"id": 1,
"name": "Movie"
},
{
"id": 2,
"name": "Music"
},
{
"id": 3,
"name": "TV"
}
]
}],
"selectors": {
"userSeedingTorrents": {
"page": "/torrents.php?type=seeding&userid=$user.id$",
"parser": "getUserSeedingTorrents.js",
"fields": {
"bonus": {
"selector": ["[href='bonus.php']+span"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": ["td.number_column.nobr"],
"filters": ["jQuery.map(query, (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
},
"seedingList": {
"selector": ["a[href*='torrentid=']"],
"filters": ["jQuery.map(query, item=>$(item).attr('href').match(/torrentid=(\\d+)/)[1])"]
}
}
}
}
}
================================================
FILE: resource/sites/uhdbits.org/getSearchResult.js
================================================
if (!"".getQueryString) {
String.prototype.getQueryString = function(name, split) {
if (split == undefined) split = "&";
var reg = new RegExp(
"(^|" + split + "|\\?)" + name + "=([^" + split + "]*)(" + split + "|$)"
),
r;
if ((r = this.match(reg))) return decodeURI(r[2]);
return null;
};
}
(function(options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/auth_form/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
if (
/没有种子|No [Tt]orrents?|Your search did not match anything|用准确的关键字重试/.test(
options.responseText
)
) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
let site = options.site;
let results = [];
// 获取种子列表行
let rows = options.page.find(
options.resultSelector || "table.torrent_table:last > tbody > tr"
);
if (rows.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return results;
}
// 获取表头
let header = rows.eq(0).find("th,td");
// 用于定位每个字段所列的位置
let fieldIndex = {
time: 4,
size: 5,
seeders: 7,
leechers: 8,
completed: 6,
comments: 3,
author: 9
};
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
try {
// 遍历数据行
for (let index = 1; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let id = row.find("a[href*='#torrent']").first()
id = id.attr('href').match(/#torrent(\d+)/)[1]
let title = row.find("a[href*='torrents.php?id=']").first();
if (title.length == 0) {
continue;
}
let subTitle = row.find("div.torrent_info").first();
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
// 获取下载链接
let url = row
.find("a[href*='torrents.php?action=download'][title='Download']")
.first();
if (url.length == 0) {
continue;
}
url = url.attr("href");
if (url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
let time =
fieldIndex.time == -1
? ""
: cells
.eq(fieldIndex.time)
.find("span[title],time[title]")
.attr("title") ||
cells.eq(fieldIndex.time).text() ||
"";
if (time) {
time += ":00";
}
let data = {
id,
title: title.text() + ' / ' +subTitle.text(),
//subTitle: subTitle.text(),
link,
url: url,
size: cells.eq(fieldIndex.size).html() || 0,
time: time,
author:
fieldIndex.author == -1
? ""
: cells.eq(fieldIndex.author).text() || "",
seeders:
fieldIndex.seeders == -1
? ""
: cells.eq(fieldIndex.seeders).text() || 0,
leechers:
fieldIndex.leechers == -1
? ""
: cells.eq(fieldIndex.leechers).text() || 0,
completed:
fieldIndex.completed == -1
? ""
: cells.eq(fieldIndex.completed).text() || 0,
comments:
fieldIndex.comments == -1
? ""
: cells.eq(fieldIndex.comments).text() || 0,
tags: this.getTags(row),
site: site,
entryName: options.entry.name,
category: this.getCategory(cells.find("a[href*='filter_cat']"))
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
}
} catch (error) {
console.error(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.stack}`;
}
return results;
}
/**
* 获取分类
* @param {*} link 当前列
*/
getCategory(link) {
if (link.length == 0) {
return null;
}
let result = {
name: "",
link: ""
};
result.link = link.attr("href");
let id = result.link.match(/filter_cat\[(\d+)\]/)[1];
if (result.link.substr(0, 4) !== "http") {
result.link = options.site.url + result.link;
}
result.name = link.text().trim();
if (!result.name) {
result.name = this.getCategoryName(id);
}
return result;
}
getTags(row){
var query = row.find("strong:contains('Free'), strong:contains('2x'), strong:contains('%')");
var BASE_TAG_COLORS = {
// 免费下载
Free: "blue",
// 免费下载 + 2x 上传
"2xFree": "green",
// 2x 上传
"2xUp": "lime",
// 2x 上传 + 50% 下载
"2x50%": "light-green",
// 25% 下载
"25%": "purple",
// 30% 下载
"30%": "indigo",
// 35% 下载
"35%": "indigo darken-3",
// 50% 下载
"50%": "orange",
// 70% 下载
"70%": "blue-grey",
// 75% 下载
"75%": "lime darken-3",
// 仅 VIP 可下载
VIP: "orange darken-2",
// 禁止转载
"⛔️": "deep-orange darken-1"
};
if(query.length > 0) {
query = query.text().replace(' ','').replace('↓','');
var result = [{
name: query,
color: BASE_TAG_COLORS[query]
}]
return result;
}
}
getCategoryName(id) {
if ($.isEmptyObject(this.categories)) {
let cells = options.page.find(".cat_list:first").find("td");
cells.each((i, dom) => {
let id = $(dom)
.find("input")
.attr("id")
.replace("cat_", "");
let name = $(dom)
.find("label")
.text();
if (id) {
this.categories[id] = name;
}
});
}
return this.categories ? this.categories[id] : "";
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, Searcher);
================================================
FILE: resource/sites/uhdbits.org/getUserSeedingTorrents.js
================================================
if ("".getQueryString === undefined) {
String.prototype.getQueryString = function(name, split) {
if (split == undefined) split = "&";
var reg = new RegExp(
"(^|" + split + "|\\?)" + name + "=([^" + split + "]*)(" + split + "|$)"
),
r;
if ((r = this.match(reg))) return decodeURI(r[2]);
return null;
};
}
(function(options, User) {
class Parser {
constructor(options, dataURL) {
this.options = options;
this.dataURL = dataURL;
this.body = null;
this.rawData = "";
this.pageInfo = {
count: 0,
current: 1
};
this.result = {
seedingSize: 0,
bonus: 0,
seedingList: []
};
this.load();
}
/**
* 完成
*/
done() {
this.options.resolve(this.result);
}
/**
* 解析内容
*/
parse() {
const doc = new DOMParser().parseFromString(this.rawData, "text/html");
// 构造 jQuery 对象
this.body = $(doc).find("body");
this.getPageInfo();
let results = new User.InfoParser(User.service).getResult(
this.body,
this.options.rule
);
if (results) {
this.result.seedingSize += results.seedingSize;
this.result.seedingList = this.result.seedingList.concat(results.seedingList)
}
// 是否已到最后一页
if (this.pageInfo.current < this.pageInfo.count) {
this.pageInfo.current++;
this.load();
} else {
if (results) {
this.result.bonus = this.body
.find("[href='bonus.php']+span")
.text();
}
this.done();
}
}
/**
* 获取页面相关内容
*/
getPageInfo() {
if (this.pageInfo.count > 0) {
return;
}
// 获取最大页码
const infos = this.body
.find("a[href*='torrents.php?page=']:contains('Last'):last")
.attr("href");
if (infos) {
this.pageInfo.count = parseInt(infos.getQueryString("page"));
} else {
this.pageInfo.count = 2;
}
}
/**
* 加载当前页内容
*/
load() {
let url = this.dataURL;
if (this.pageInfo.current > 1) {
url += "&page=" + this.pageInfo.current;
}
$.get(url)
.done(result => {
this.rawData = result;
this.parse();
})
.fail(() => {
this.done();
});
}
}
let dataURL = options.site.activeURL + options.rule.page;
dataURL = dataURL
.replace("$user.id$", options.userInfo.id)
.replace("$user.name$", options.userInfo.name)
.replace("://", "****")
.replace(/\/\//g, "/")
.replace("****", "://");
new Parser(options, dataURL);
})(_options, _self);
/**
*
_options 表示当前参数
{
site,
rule,
userInfo,
resolve,
reject
}
_self 表示 User(/src/background/user.ts) 类实例
*/
================================================
FILE: resource/sites/ultrahd.net/config.json
================================================
{
"name": "UltraHD",
"timezoneOffset": "+0800",
"schema": "NexusPHP",
"url": "https://ultrahd.net",
"description": "韩剧",
"icon": "https://ultrahd.net/favicon.ico",
"tags": [
"电影",
"电视剧",
"综艺",
"纪录片",
"动漫"
],
"host": "ultrahd.net",
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": [
".torrentname td:first-child > div[title]:last-child"
],
"filters": [
"query ? query.attr('title').match(/([\\d\\.]+)%/) : null",
"(query && query.length >= 2) ? parseFloat(query[1]) : null"
]
},
"status": {
"selector": [
".torrentname td:first-child > div[title]:last-child"
],
"filters": [
"query ? query.attr('title').split(' ')[0] : null",
"query === 'leeching' ? 1 : query === 'seeding' ? 2 : query === 'inactivity' ? 255 : null"
]
}
}
},
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["b:first"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
},
"levelRequirements": [{
"level": "1",
"name": " Power User",
"interval": "5",
"downloaded": "100GB",
"ratio": "3.0",
"seedingPoints": "100000",
"privilege": "可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕"
},{
"level": "2",
"name": "Elite User",
"interval": "10",
"downloaded": "300GB",
"ratio": "3.5",
"seedingPoints": "200000",
"privilege": "Elite User及以上用户封存账号后不会被删除"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "500GB",
"ratio": "4.0",
"seedingPoints": "400000",
"privilege": "可以在做种/下载/发布的时候选择匿名模式"
},{
"level": "4",
"name": "Insane User",
"interval": "20",
"downloaded": "1TB",
"ratio": "4.5",
"seedingPoints": "600000",
"privilege": "可以查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "25",
"downloaded": "2TB",
"ratio": "5.0",
"seedingPoints": "800000",
"privilege": "可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号"
},{
"level": "6",
"name": "Extreme User",
"interval": "30",
"downloaded": "4TB",
"ratio": "5.5",
"seedingPoints": "1000000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。【可以开启特别区和查看特别区资源】。"
},{
"level": "7",
"name": "Ultimate User",
"interval": "35",
"downloaded": "6TB",
"ratio": "6.0",
"seedingPoints": "1200000",
"privilege": "得到一个邀请名额"
},{
"level": "8",
"name": "Nexus Master",
"interval": "40",
"downloaded": "8TB",
"ratio": "6.5",
"seedingPoints": "1500000",
"privilege": "得到两个邀请名额"
}],
"searchEntry": [
{ "name": "全站", "enabled": true },
{ "name": "电影", "queryString": "cat401=1", "enabled": false },
{ "name": "电视剧", "queryString": "cat402=1", "enabled": false },
{ "name": "综艺", "queryString": "cat403=1", "enabled": false },
{ "name": "纪录片", "queryString": "cat404=1", "enabled": false },
{ "name": "动漫", "queryString": "cat405=1", "enabled": false }
]
}
================================================
FILE: resource/sites/wintersakura.net/config.json
================================================
{
"name": "wintersakura",
"timezoneOffset": "+0800",
"description": "wintersakura",
"url": "https://wintersakura.net/",
"icon": "https://wintersakura.net/favicon.ico",
"tags": [],
"schema": "NexusPHP",
"host": "wintersakura.net",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"downloaded": "50GB",
"ratio": "1",
"seedingPoints": "50000",
"privilege": "可以查看NFO文档;可以请求续种; 可以购买/发送邀请;可以删除自己上传的字幕。可以申请友情链接;可以使用个性条。"
},
{
"level": 2,
"name": "Elite User",
"downloaded": "400GB",
"ratio": "1.5",
"seedingPoints": "120000",
"privilege": "可以查看种子结构;可以更新外部信息"
},
{
"level": 3,
"name": "Crazy User",
"downloaded": "800GB",
"ratio": "2",
"seedingPoints": "200000",
"privilege": "可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"downloaded": "1.5TB",
"ratio": "3",
"seedingPoints": "500000",
"privilege": "可以查看排行榜。"
},
{
"level": 5,
"name": "Veteran User",
"downloaded": "3TB",
"ratio": "4",
"seedingPoints": "800000",
"privilege": "可以查看其它用户种子历史。(只有用户的隐私等级没有设为’强‘时才生效)"
},
{
"level": 6,
"name": "Extreme User",
"downloaded": "5TB",
"ratio": "6",
"seedingPoints": "1400000",
"privilege": "可以更新过期的外部信息。Extreme User 及以上用户封存账号后不会被删除"
},
{
"level": 7,
"name": "Ultimate User",
"downloaded": "6TB",
"ratio": "8",
"seedingPoints": "2000000",
"privilege": "首次到达此等级得到1个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"downloaded": "10TB",
"ratio": "9.5",
"seedingPoints": "2800000",
"privilege": "首次到达此等级得到1个邀请名额Nexus Master及以上用户会永远保留账号。"
}
],
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/world-in-hd.net/browse.js
================================================
(function($) {
console.log("this is browse.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $(
"div.download-item a[href*='/torrents/download/']"
).toArray();
let siteURL = PTService.site.url;
if (siteURL.substr(-1) == "/") {
siteURL = siteURL.substr(0,siteURL.length-1);
}
if (links.length == 0) {
// "获取下载链接失败,未能正确定位到链接";
return this.t("getDownloadURLsFailed");
}
let urls = $.map(links, item => {
let link = $(item).attr("href");
if (link && link.substr(0, 4) != "http") {
link = siteURL + link;
}
return link;
});
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("div.torrent-h3 > span").text().split("-")[1].trim().replace('o','B')
);
}
/**
* 获取有效的拖放地址
* @param {*} url
*/
getDroperURL(url) {
if (url.indexOf("download") === -1) {
return "";
}
return url;
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/world-in-hd.net/config.json
================================================
{
"name": "WiHD",
"timezoneOffset": "+0200",
"schema": "WiHD",
"url": "https://world-in-hd.net/",
"icon": "https://world-in-hd.net/media/cache/icon32/appicon.png",
"tags": ["影视"],
"host": "world-in-hd.net",
"collaborator": "luckiestone",
"plugins": [{
"name": "种子详情页面",
"pages": ["/torrent/view/"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["/torrents"],
"scripts": ["/schemas/NexusPHP/common.js", "browse.js"]
}],
"levelRequirements": [
{
"level": "1",
"name": "720p",
"interval": "5",
"uploaded": "250GB",
"ratio": "2"
},
{
"level": "2",
"name": "1080i",
"interval": "15",
"uploaded": "400GB",
"ratio": "3"
},
{
"level": "3",
"name": "1080p",
"interval": "25",
"uploaded": "1.2TB",
"ratio": "4.5"
}
],
"searchEntryConfig": {
"skipIMDbId": true,
"page": "/torrent/ajaxsearchtorrent/$key$",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "div.torrent-body"
},
"supportedFeatures": {
"imdbSearch": false,
"userData": "◐"
},
"searchEntry": [{
"name": "all",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "div.fl-item"
}],
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"name": {
"selector": "span.username"
},
"bonus": {
"value": "N/A"
},
"messageCount": {
"selector": ["li.messages li.message", "li.notifications li.notification"],
"filters": ["(query && query.length>=1)?11:0"]
},
"seeding": {
"selector": ["i.fa-upload + strong"]
},
"seedingSize": {
"value": -1
}
}
},
"userExtendInfo": {
"page": "/profils/user/$user.name$",
"fields": {
"uploaded": {
"selector": ["div.stats a.btn:contains('Upload')"],
"filters": ["query.text().replace(/,/g,'').replace('o','B').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
},
"downloaded": {
"selector": ["div.stats a.btn:contains('Download')"],
"filters": ["query.text().replace(/,/g,'').replace('o','B').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
},
"levelName": {
"selector": "span.class"
},
"joinTime": {
"selector": "div.user-block-content:first",
"filters": ["query.text().trim()", "dateTime(query,'DD\/MM\/YYYY').isValid()?dateTime(query,'DD\/MM\/YYYY').valueOf():query"]
}
}
}
}
}
================================================
FILE: resource/sites/world-in-hd.net/details.js
================================================
(function($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
let query = $("div.download a[href*='/torrents/download/']");
let url = "";
if (query.length > 0) {
url = query.attr("href");
}
if (!url) {
return "";
}
return `${location.origin}${url}`;
}
/**
* 获取当前种子标题
*/
getTitle() {
let title = $("header.panel-heading h2").text().trim();
return title;
}
}
new App().init();
})(jQuery, window);
================================================
FILE: resource/sites/world-in-hd.net/getSearchResult.js
================================================
if (!"".getQueryString) {
String.prototype.getQueryString = function(name, split) {
if (split == undefined) split = "&";
var reg = new RegExp(
"(^|" + split + "|\\?)" + name + "=([^" + split + "]*)(" + split + "|$)"
),
r;
if ((r = this.match(reg))) return decodeURI(r[2]);
return null;
};
}
(function(options) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/login\.php/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
let site = options.site;
let results = [];
// 获取种子列表行
let rows = options.page.find(options.resultSelector);
if (rows.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return results;
}
// 用于定位每个字段所列的位置
let fieldIndex = {
time: 1,
size: 2,
seeders: 3,
leechers: 4,
completed: 5,
comments: 6,
author: 7,
category: 8,
title: 0
};
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
try {
// 遍历数据行
for (let index = 0; index < rows.length; index++) {
const row = rows.eq(index);
let timeStrMatch = row.find("div.torrent-h3 > span").text().split("-")[0].replace('Il y a','');
let timeStr = timeStrMatch.trim();
let cells = [];
cells[2] = row.find("div.torrent-h3 > span").text().split("-")[1].trim().replace('o','B');
cells[3] = row.find("div.seeders").text().replace('Seeders','').trim();
cells[4] = row.find("div.leechers").text().replace('Leechers','').trim();
cells[5] = row.find("div.completed").text().replace('Complétés','').trim();
cells[6] = row.find("div.comments").text().replace('Commentaires','').trim();
cells[7] = row.find("div.uploader a.username").text().trim();
cells[8] = row.find("div.category img").attr("title");
cells[9] = row.find("div.completed").text().replace('Complétés','').trim();
let title = row.find("div.torrent-h3 h3 a");
if (title.length == 0) {
continue;
}
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
// 获取下载链接
let url = row.find("a[href*='/torrents/download/']:first").attr("href");
if (url && url.substr(0, 4) !== "http") {
url = `${site.url}${url}`;
}
let data = {
title: title.text(),
subTitle: "",
link,
url,
size: cells[fieldIndex.size] || 0,
time: this.getTime(timeStr),
author:
fieldIndex.author == -1
? ""
: cells[fieldIndex.author] || "",
seeders:
fieldIndex.seeders == -1
? ""
: cells[fieldIndex.seeders] || 0,
leechers:
fieldIndex.leechers == -1
? ""
: cells[fieldIndex.leechers] || 0,
completed:
fieldIndex.completed == -1
? ""
: cells[fieldIndex.completed] || 0,
comments:
fieldIndex.comments == -1
? ""
: cells[fieldIndex.comments] || 0,
site: site,
entryName: options.entry.name,
category:
fieldIndex.category == -1
? ""
: cells[fieldIndex.category] || "",
tags: this.getTags(row, options.torrentTagSelectors)
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
}
} catch (error) {
console.error(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.stack}`;
}
return results;
}
getTime(timeStr) {
let timeRegex = timeStr.match(
/((\d+).+?(Minute|Heure|Jour|Moi|Année)s?.*?(\,|and))?.*?(\d+).+?(Minute|Heure|Jour|Moi|Année)s?/
);
let milliseconds = 0;
if (timeRegex) {
if (timeRegex[1] == undefined) {
milliseconds = this.getMilliseconds(timeRegex[5], timeRegex[6]);
} else {
milliseconds = this.getMilliseconds(timeRegex[2], timeRegex[3]) + this.getMilliseconds(timeRegex[5], timeRegex[6]);
}
}
let timeStamp = Date.now() - milliseconds;
let date = new Date(timeStamp);
return date.toISOString();
}
getMilliseconds(num, unit) {
let milliseconds = 0;
milliseconds = num*60*1000;
if(unit == "Minute") {return milliseconds;}
milliseconds = milliseconds*60;
if(unit == "Heure") {return milliseconds;}
milliseconds = milliseconds*24;
if(unit == "Jour") {return milliseconds;}
milliseconds = milliseconds*30;
if(unit == "Moi") {return milliseconds;}
milliseconds = milliseconds*12;
return milliseconds;
}
/**
* 获取标签
* @param {*} row
* @param {*} selectors
* @return array
*/
getTags(row, selectors) {
let tags = [];
if (selectors && selectors.length > 0) {
// 使用 some 避免错误的背景类名返回多个标签
selectors.some(item => {
if (item.selector) {
let result = row.find(item.selector);
if (result.length) {
tags.push({
name: "Free",
color: "blue"
});
return true;
}
}
});
}
return tags;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options);
================================================
FILE: resource/sites/www.beitai.pt/config.json
================================================
{
"name": "备胎",
"timezoneOffset": "+0800",
"schema": "NexusPHP",
"url": "https://www.beitai.pt/",
"description": "找不到家时,接纳无家可归的人",
"icon": "https://www.beitai.pt/favicon.ico",
"tags": [
"综合"
],
"host": "www.beitai.pt",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"privilege": "得到一个邀请名额;直接发布种子;查看NFO文档;查看用户列表;请求续种;发送邀请;查看排行榜;查看其它用户的种子历史;删除自己上传的字幕。"
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"privilege": "封存账号后不会被删除"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"privilege": "得到两个邀请名额;在做种/下载/发布的时候选择匿名模式"
},{
"level": "4",
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.55",
"privilege": "发送邀请;查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"privilege": "永远保留账号;得到三个邀请名额;查看其它用户的评论、帖子历史"
},{
"level": "6",
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"privilege": "更新过期的外部信息;查看Extreme User论坛"
},{
"level": "7",
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"privilege": "得到五个邀请名额"
},{
"level": "8",
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"privilege": "得到十个邀请名额"
}],
"collaborator": ["wyx1818", "tongyifan"],
"searchEntryConfig": {
"area": [
{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"appendQueryString": "&search_area=1"
}
],
"fieldSelector": {
"progress": {
"selector": [
"> td:eq(8)"
],
"filters": [
"query.text()==='-'?null:parseFloat(query.text().split('%')[0])"
]
},
"status": {
"selector": [
"> td:eq(8)"
],
"filters": [
"query.text()==='-'?null:(query.is(\"[bgcolor='#44cef6']\")?1:(parseFloat(query.text().split('%')[0])==100?(query.is(\"[bgcolor='#d0d0d0']\")?255:2):3))"
]
}
}
},
"searchEntry": [
{
"name": "全站",
"enabled": true
},
{
"queryString": "cat401=1",
"name": "Movies",
"enabled": false
},
{
"queryString": "cat404=1",
"name": "Documentaries",
"enabled": false
},
{
"queryString": "cat405=1",
"name": "Animations",
"enabled": false
},
{
"queryString": "cat402=1",
"name": "TV Series",
"enabled": false
},
{
"queryString": "cat403=1",
"name": "TV Shows",
"enabled": false
},
{
"queryString": "cat406=1",
"name": "Music Videos",
"enabled": false
},
{
"queryString": "cat407=1",
"name": "Sports",
"enabled": false
},
{
"queryString": "cat409=1",
"name": "Misc",
"enabled": false
},
{
"queryString": "cat408=1",
"name": "HQ Audio",
"enabled": false
}
],
"categories": [
{
"entry": "torrents.php",
"result": "&cat$id$=1",
"category": [
{
"id": 401,
"name": "Movies"
},
{
"id": 404,
"name": "Documentaries"
},
{
"id": 405,
"name": "Animations"
},
{
"id": 402,
"name": "TV Series"
},
{
"id": 403,
"name": "TV Shows"
},
{
"id": 406,
"name": "Music Videos"
},
{
"id": 407,
"name": "Sports"
},
{
"id": 409,
"name": "Misc"
},
{
"id": 408,
"name": "HQ Audio"
}
]
}
]
}
================================================
FILE: resource/sites/www.cgpeers.com/config.json
================================================
{
"name": "CGPeers",
"timezoneOffset": "+0000",
"schema": "GazelleJSONAPI",
"url": "https://www.cgpeers.com/",
"icon": "https://www.cgpeers.com/favicon.ico",
"tags": ["设计", "素材"],
"host": "www.cgpeers.com",
"collaborator": "bimzcy",
"supportedFeatures": {
"imdbSearch": false,
"userData": "◐"
}
}
================================================
FILE: resource/sites/www.cinematik.net/browse.js
================================================
(function($) {
console.log("this is browse.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
this.initFreeSpaceButton();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initListButtons();
}
/**
* 获取下载链接
*/
getDownloadURLs() {
let links = $(
"a.brolin[href*='details.php?id='][href*='hit=1']:has(b)"
).toArray();
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (links.length == 0) {
// "获取下载链接失败,未能正确定位到链接";
return this.t("getDownloadURLsFailed");
}
let urls = $.map(links, item => {
let url =
"download.php?id=" +
$(item)
.attr("href")
.getQueryString("id");
if (url) {
url = siteURL + url;
}
return url;
});
return urls;
}
/**
* 确认大小是否超限
*/
confirmWhenExceedSize() {
return this.confirmSize(
$("table[border='1']:last").find(
"td:contains('MB'),td:contains('GB'),td:contains('TB')"
)
);
}
/**
* 获取有效的拖放地址
* @param {*} url
*/
getDroperURL(url) {
let siteURL = PTService.site.url;
if (siteURL.substr(-1) != "/") {
siteURL += "/";
}
if (!url.getQueryString) {
PTService.showNotice({
msg:
"系统依赖函数(getQueryString)未正确加载,请尝试刷新页面或重新启用插件。"
});
return null;
}
let id = url.getQueryString("id");
if (id) {
url = siteURL + "download.php?id=" + id;
} else {
url = "";
}
return url;
}
}
new App().init();
})(jQuery);
================================================
FILE: resource/sites/www.cinematik.net/config.json
================================================
{
"name": "Cinematik",
"timezoneOffset": "+0000",
"schema": "Cinematik",
"url": "https://www.cinematik.net/",
"icon": "https://www.cinematik.net/favicon.ico",
"tags": ["影视"],
"host": "www.cinematik.net",
"collaborator": "DXV5",
"plugins": [{
"name": "种子详情页面",
"pages": ["/details.php"],
"scripts": ["/schemas/NexusPHP/common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["/browse.php"],
"scripts": ["/schemas/NexusPHP/common.js", "browse.js"]
}],
"levelRequirements": [
{
"level": "1",
"name": "Power User",
"interval": "8",
"uploaded": "100GB",
"ratio": "1.1",
"privilege": "More download slots"
}
],
"searchEntryConfig": {
"page": "/browse.php",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"queryString": "search=$key$&incldead=1",
"area": [{
"name": "IMDB",
"queryString": "search=$key$&incldead=1&srchdtls=1",
"keyAutoMatch": "^(tt\\d+)$"
}]
},
"searchEntry": [{
"name": "all",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "img[src*='freedownload.png']"
}, {
"name": "2xFree",
"selector": "img[src*='platinumdownload.png']"
}, {
"name": "25%",
"selector": "img[src*='silverdownload.png']"
}],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": "div#menu a[href*='userdetails.php']",
"attribute": "href",
"filters": ["query ? query.getQueryString('id'):''"]
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"name": {
"selector": "table.mainouter > tbody > tr > td > table.main h1"
},
"uploaded": {
"selector": ["#user-default td.rowhead:contains('Uploaded') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["#user-default td.rowhead:contains('Downloaded') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"levelName": {
"selector": "#user-default td.rowhead:contains('Class') + td"
},
"bonus": {
"value": "N/A"
},
"joinTime": {
"selector": "#user-default td.rowhead:contains('Join') + td",
"filters": ["query.text().split(' (')[0]", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
}
}
},
"userSeedingTorrents": {
"page": "/userdetails-tab.php?SID=&id=$user.id$&mode=7&page=0",
"fields": {
"seeding": {
"selector": ["table:first tr:not(:eq(0))"],
"filters": ["query.length"]
},
"seedingSize": {
"selector": ["table:first tr:not(:eq(0))"],
"filters": ["jQuery.map(query.find('td:eq(4)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
}
}
}
}
}
================================================
FILE: resource/sites/www.cinematik.net/details.js
================================================
(function($, window) {
console.log("this is details.js");
class App extends window.NexusPHPCommon {
init() {
this.initButtons();
// 设置当前页面
PTService.pageApp = this;
}
/**
* 初始化按钮列表
*/
initButtons() {
this.initDetailButtons();
}
/**
* 获取下载链接
*/
getDownloadURL() {
let query = $("a[href*='download.php?id=']");
let url = "";
if (query.length > 0) {
url = query.attr("href");
}
if (!url) {
let id = location.href.getQueryString("id");
url = `download.php?id=${id}`;
}
if (!url) {
return "";
}
return `${location.origin}/${url}`;
}
/**
* 获取当前种子标题
*/
getTitle() {
let title = $("title").text();
return title.replace("Cinematik :: ", "");
}
}
new App().init();
})(jQuery, window);
================================================
FILE: resource/sites/www.cinematik.net/getSearchResult.js
================================================
(function(options) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/takelogin\.php/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;
return;
}
options.isLogged = true;
if (
/没有种子|No [Tt]orrents?|Your search did not match anything|用准确的关键字重试/.test(
options.responseText
)
) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
return;
}
this.haveData = true;
}
/**
* 获取搜索结果
*/
getResult() {
let site = options.site;
let results = [];
// 获取种子列表行
let rows = options.page.find(
options.resultSelector || "table[border='1']:last > tbody > tr"
);
if (rows.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return results;
}
// 获取表头
let header = rows.eq(0).find("th,td");
// 用于定位每个字段所列的位置
let fieldIndex = {
time: 10,
size: 6,
seeders: 8,
leechers: 9,
completed: 7,
comments: -1,
author: -1,
category: 0,
title: 1
};
if (site.url.lastIndexOf("/") != site.url.length - 1) {
site.url += "/";
}
try {
// 遍历数据行
for (let index = 1; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(">td");
let title = row.find("a[href*='details.php?id=']").first();
if (title.length == 0) {
continue;
}
let link = title.attr("href");
if (link && link.substr(0, 4) !== "http") {
link = `${site.url}${link}`;
}
let id = link.getQueryString("id");
// 获取下载链接
let url = `${site.url}download.php?id=${id}`;
let time =
fieldIndex.time == -1
? ""
: cells
.eq(fieldIndex.time)
.find("div.addedtor")
.text() || "";
let data = {
title: title.text(),
subTitle: "",
link,
url: url,
size: cells.eq(fieldIndex.size).html() || 0,
time: time,
author:
fieldIndex.author == -1
? ""
: cells.eq(fieldIndex.author).text() || "",
seeders:
fieldIndex.seeders == -1
? ""
: cells.eq(fieldIndex.seeders).text() || 0,
leechers:
fieldIndex.leechers == -1
? ""
: cells.eq(fieldIndex.leechers).text() || 0,
completed:
fieldIndex.completed == -1
? ""
: cells.eq(fieldIndex.completed).text() || 0,
comments:
fieldIndex.comments == -1
? ""
: cells.eq(fieldIndex.comments).text() || 0,
site: site,
entryName: options.entry.name,
category: this.getCategory(cells.eq(fieldIndex.category)),
tags: options.searcher.getRowTags(site, row)
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents; //`[${options.site.name}]没有搜索到相关的种子`;
}
} catch (error) {
console.error(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.stack}`;
}
return results;
}
/**
* 获取分类
* @param {*} cell 当前列
*/
getCategory(cell) {
let result = {
name: "",
link: ""
};
let link = cell.find("a:first");
let img = link.find("img:first");
result.link = link.attr("href");
if (result.link.substr(0, 4) !== "http") {
result.link = options.site.url + result.link;
}
result.name = img.attr("alt");
return result;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options);
================================================
FILE: resource/sites/www.cinematik.net/getUserSeedingTorrents.js
================================================
if ("".getQueryString === undefined) {
String.prototype.getQueryString = function(name, split) {
if (split == undefined) split = "&";
var reg = new RegExp(
"(^|" + split + "|\\?)" + name + "=([^" + split + "]*)(" + split + "|$)"
),
r;
if ((r = this.match(reg))) return decodeURI(r[2]);
return null;
};
}
(function(options, User) {
class Parser {
constructor(options, dataURL) {
this.options = options;
this.dataURL = dataURL;
this.body = null;
this.rawData = "";
this.pageInfo = {
count: 0,
current: 0
};
this.result = {
seeding: 0,
seedingSize: 0
};
this.load();
}
/**
* 完成
*/
done() {
this.options.resolve(this.result);
}
/**
* 解析内容
*/
parse() {
const doc = new DOMParser().parseFromString(this.rawData, "text/html");
// 构造 jQuery 对象
this.body = $(doc).find("body");
this.getPageInfo();
let results = new User.InfoParser(User.service).getResult(
this.body,
this.options.rule
);
if (results) {
this.result.seeding += results.seeding;
this.result.seedingSize += results.seedingSize;
}
// 是否已到最后一页
if (this.pageInfo.current < this.pageInfo.count) {
this.pageInfo.current++;
this.load();
} else {
this.done();
}
}
/**
* 获取页面相关内容
*/
getPageInfo() {
if (this.pageInfo.count > 0) {
return;
}
// 获取最大页码
const infos = this.body
.find("a[href*='type=seeding']:contains('1'):last")
.attr("href");
if (infos) {
this.pageInfo.count = parseInt(infos.getQueryString("page"));
} else {
this.pageInfo.count = 1;
}
}
/**
* 加载当前页内容
*/
load() {
let url = this.dataURL;
if (this.pageInfo.current > 0) {
url += "&page=" + this.pageInfo.current;
}
$.get(url)
.done(result => {
this.rawData = result;
this.parse();
})
.fail(() => {
this.done();
});
}
}
let dataURL = options.site.activeURL + options.rule.page;
dataURL = dataURL
.replace("$user.id$", options.userInfo.id)
.replace("$user.name$", options.userInfo.name)
.replace("://", "****")
.replace(/\/\//g, "/")
.replace("****", "://");
new Parser(options, dataURL);
})(_options, _self);
/**
*
_options 表示当前参数
{
site,
rule,
userInfo,
resolve,
reject
}
_self 表示 User(/src/background/user.ts) 类实例
*/
================================================
FILE: resource/sites/www.empornium.sx/config.json
================================================
{
"name": "Empornium",
"timezoneOffset": "+0000",
"description": "EMP",
"url": "https://www.empornium.sx/",
"tags": ["Adult"],
"schema": "Common",
"plugins": [{
"name": "种子列表",
"pages": ["/torrents.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/torrents.js"]
}],
"host": "www.empornium.sx",
"formerHosts": [
"www.empornium.me",
"www.empornium.is"
],
"searchEntryConfig": {
"page": "torrents.php?searchtext=$key$",
"resultType": "html",
"resultSelector": "table.torrent_table.grouping",
"dataRowSelector": " > tbody > tr:not(:first-child)",
"fieldIndex": {
"category": 0,
"title": 1,
"link": 1,
"comments": 3,
"time": 4,
"size": 5,
"author": 9,
"seeders": 7,
"leechers": 8,
"completed": 6
},
"fieldSelector": {
"category": {
"selector": ["div[title]"],
"filters": ["query.attr('title')"]
},
"title": {
"selector": ["a[onmouseout]"],
"filters": ["query.text()"]
},
"link": {
"selector": ["a[onmouseout]"],
"filters": ["query.attr('href')"]
},
"url": {
"selector": ["a[href*='action=download&id=']"],
"filters": ["query.attr('href')"]
},
"time": {
"selector": [""],
"filters": ["query.text()"]
},
"progress": {
"selector": ["a[title='Currently Seeding Torrent'], a[title='Previously Snatched Torrent']", "a[title='Previously Grabbed Torrent File']", ""],
"switchFilters": [
["100"],
["0"],
["null"]
]
},
"status": {
"selector": ["a[title='Currently Seeding Torrent']", "a[title='Previously Snatched Torrent']", "a[title='Previously Grabbed Torrent File']"],
"switchFilters": [
["2"],
["255"],
["3"]
]
}
}
},
"searchEntry": [{
"name": "全部",
"enabled": true
}],
"torrentTagSelectors": [{
"name": "Free",
"selector": "span[title='Unlimited Freeleech']"
}],
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": ["a.username[href*='user.php']:first"],
"attribute": "href",
"filters": ["query ? query.getQueryString('id'):''"]
},
"name": {
"selector": "a.username"
},
"isLogged": {
"selector": ["#nav_logout"],
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["div.alertbar"],
"filters": ["(query && query.length>=1)?11:0"]
},
"seeding": {
"selector": ["#nav_seeding_r"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):null"]
},
"uploaded": {
"selector": ["td:contains('Up:') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["td:contains('Down:') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"ratio": {
"selector": ["td:contains('Ratio:') + td"],
"filters": ["query.text()"]
},
"bonus": {
"selector": ["td:contains('Credits:') + td"],
"filters": ["query.text()"]
}
}
},
"userExtendInfo": {
"page": "/user.php?id=$user.id$",
"fields": {
"joinTime": {
"selector": ["li:contains('Joined:') > span.time"],
"filters": ["dateTime(query.attr('title')).valueOf()"]
},
"levelName": {
"selector": ["span.rank"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": ["ul.stats.nobullet > li:contains('Seeding Size:')"],
"filters": ["query.text().replace('Seeding Size: ', '').replace(/,/g,'')","query.sizeToNumber()"]
}
}
},
"common": {
"page": "/torrents.php",
"fields": {
"size": {
"selector": ["#content > div > div:nth-child(4) td:contains('iB')"],
"filters": ["query.parent().text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"]
},
"sayThanksButton": {
"selector": ["#thanksbutton"],
"filters": ["query"]
},
"downloadURLs": {
"selector": ["table.torrent_table a[href*='action=download&id='],a.button.blueButton"],
"filters": ["query.toArray()"]
},
"confirmSize": {
"selector": ["table#torrent_table"],
"filters": ["query.find('td.nobr:contains(\\'iB\\')')"]
}
}
}
}
}
================================================
FILE: resource/sites/www.filept.com/config.json
================================================
{
"name": "filept",
"schema": "NexusPHP",
"url": "https://www.filept.com/",
"description": "",
"icon": "https://www.filept.com/favicon.ico",
"tags": [
"影视","综合"
],
"host": "www.filept.com",
"collaborator": "koal",
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["b:first"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/www.gamegamept.com/config.json
================================================
{
"name": "GGPT",
"timezoneOffset": "+0800",
"description": "gamegamept.com",
"url": "https://www.gamegamept.com/",
"icon": "https://www.gamegamept.com/favicon.ico",
"tags": ["游戏"],
"schema": "NexusPHP",
"host": "www.gamegamept.com",
"collaborator": [
"IITII",
"yiyule"
],
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "2",
"privilege": "可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "8",
"downloaded": "100G",
"ratio": "2.5",
"privilege": "没有新权限增加"
},
{
"level": 3,
"name": "Crazy User",
"interval": "15",
"downloaded": "300G",
"ratio": "3",
"privilege": "可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "25",
"downloaded": "500G",
"ratio": "3.5",
"privilege": "可以查看普通日志。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "40",
"downloaded": "1T",
"ratio": "4",
"privilege": "可以查看其它用户的评论、帖子历史。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "60",
"downloaded": "2T",
"ratio": "4.5",
"privilege": "可以更新过期的外部信息。游戏大仙(Extreme User)及以上用户会永远保留账号。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "80",
"downloaded": "5T",
"ratio": "5",
"privilege": "这个等级会永远保留账号。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "100",
"downloaded": "10T",
"ratio": "5.5",
"privilege": "这个等级会永远保留账号。"
}
],
"plugins": [{
"name": "9KG专区",
"pages": ["/special.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/NexusPHP/torrents.js"]
},{
"name": "种子列表封面模式",
"pages": ["/torrents.php", "/special.php"],
"scripts": ["/libs/album/album.js", "torrents.js"],
"styles": ["/libs/album/style.css"]
}],
"categories": [
{
"entry": "torrents.php",
"result": "&cat$id$=1",
"category": [
{
"id": 401,
"name": "PC游戏"
},
{
"id": 404,
"name": "索尼主机游戏"
},
{
"id": 405,
"name": "微软主机游戏"
},
{
"id": 406,
"name": "任天堂主机游戏"
},
{
"id": 407,
"name": "苹果游戏"
},
{
"id": 409,
"name": "安卓游戏"
},
{
"id": 410,
"name": "游戏书藉"
},
{
"id": 411,
"name": "其他"
}
]
},{
"entry": "special.php",
"result": "&cat$id$=1",
"category": [
{
"id": 412,
"name": "9PC游戏"
},
{
"id": 413,
"name": "9索尼主机游戏"
},
{
"id": 414,
"name": "9KG-游戏"
},
{
"id": 415,
"name": "9任天堂主机游戏"
},
{
"id": 416,
"name": "9苹果游戏"
},
{
"id": 417,
"name": "9安卓游戏"
},
{
"id": 418,
"name": "其他"
}
]
}
],
"searchEntry": [
{
"name": "游戏",
"enabled": true
},
{
"entry": "special.php?search=$key$¬newword=1",
"name": "9KG",
"enabled": false
}
],
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"],
"filters": ["query ? parseFloat(query.attr('title').match(/[\\d.]+/)) : null"]
},
"status": {
"selector": ["> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"],
"filters": [
"query ? query.attr('title') : ''",
"query.indexOf('seeding') != -1 ? 2 : query.indexOf('leeching') != -1 ? 1 : query.indexOf('100%') != -1 ? 255 : 3"
]
}
}
},
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
================================================
FILE: resource/sites/www.gamegamept.com/torrents.js
================================================
(function($, window) {
// 添加封面模式
PTService.addButton({
title: PTService.i18n.t("buttons.coverTip"), //"以封面的方式进行查看",
icon: "photo",
label: PTService.i18n.t("buttons.cover"), //"封面模式",
click: (success, error) => {
// 获取目标表格
let tables = $("table.torrentname");
let images = [];
tables.each((index, item) => {
let img = $("img[src]", item);
let url = img.attr("src");
let href = $("a", item).attr("href");
let title = $("a", item).find("b").text();
images.push({
url: url,
key: href,
title: title, //img.parent().attr("title"),
link: $("a", item).attr("href")
});
});
// 创建预览
new album({
images: images,
onClose: () => {
PTService.buttonBar.show();
}
});
success();
PTService.buttonBar.hide();
}
});
})(jQuery, window);
================================================
FILE: resource/sites/www.gaytor.rent/config.json
================================================
{
"name": "GTru",
"timezoneOffset": "+0100",
"url": "https://www.gaytor.rent/",
"cdn": ["https://www.gaytor.rent","https://www.gaytorrent.ru/"],
"icon": "https://www.gaytor.rent/favicon.ico",
"tags": ["影视", "成人", "综合"],
"schema": "GTru",
"host": "www.gaytor.rent",
"collaborator": "davidxuang",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "4",
"uploaded": "40 GB",
"ratio": "1.05"
}
],
"searchEntryConfig": {
"page": "/search.php",
"queryString": "search=$key$&incldead=1&inname=1&indesc=1&infn=1&orderby=added&sort=desc",
"resultType": "html",
"parseScriptFile": "getSearchResult.js",
"resultSelector": "#mysearchtable",
"fieldSelector": {
"status": {
"selector": [".tocolsnatched", ".tocolloaded"],
"switchFilters": [["255"], ["3"]]
}
}
},
"searchEntry": [
{
"name": "all",
"enabled": false
},
{
"name": "misc",
"appendQueryString": "&c46=1&c50=1&c48=1&c58=1&c45=1&c1=1",
"enabled": true
},
{
"name": "Movies",
"appendQueryString": "&c45=1",
"enabled": false
},
{
"name": "TV",
"appendQueryString": "&c1=1",
"enabled": false
},
{
"name": "Porn",
"appendQueryString": "&c62=1&c29=1&c30=1&c43=1&c19=1&c17=1&c44=1&c9=1&c7=1&c5=1&c67=1&c66=1&c34=1&c68=1&c27=1&c32=1&c63=1&c12=1&c33=1&c53=1&c57=1&c35=1&c36=1&c37=1&c54=1&c38=1&c39=1&c56=1&c40=1&c47=1&c41=1&c42=1&c51=1&c65=1&c28=1",
"enabled": false
}
],
"selectors": {
"userBaseInfo": {
"page": "/my.php",
"fields": {
"id": {
"selector": ".panel-title > a",
"attribute": "href",
"filters": ["query ? query.getQueryString('id') : ''"]
},
"name": {
"selector": ".panel-title > a"
},
"uploaded": {
"selector": ".nav:not(.navbar-right) > .navbar-text:first-of-type",
"filters": ["query ? query.text().replace(/.+UL:\\s*([\\d.]+ ?[A-Z]?i?B).+/gs, '$1').sizeToNumber() : null"]
},
"downloaded": {
"selector": ".nav:not(.navbar-right) > .navbar-text:first-of-type",
"filters": ["query ? query.text().replace(/.+DL:\\s*([\\d.]+ ?[A-Z]?i?B).*/gs, '$1').sizeToNumber() : null"]
},
"bonus": {
"selector": "#bonus"
},
"messageCount": {
"selector": "#unread"
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"levelName": {
"selector": [
"img[src*='user.gif']",
"img[src*='power.gif']",
"img[src*='vip.gif']",
"img[src*='mod.gif']",
"img[src*='sysop.gif']",
"img[src*='admin.gif']"
],
"attribute": "src",
"switchFilters": [["'User'"], ["'Power User'"], ["'VIP'"], ["'Moderator'"], ["'SysOp'"], ["'Admin'"]]
},
"joinTime": {
"selector": "td:contains('Join') + td",
"filters": ["dateTime(query.text().split(' (')[0]).valueOf()"]
},
"seedingSize": {
"selector": "#SeedingTorrents > div > table > tbody > tr:not(:first-of-type) > td:nth-of-type(3)",
"filters": ["jQuery.map(query, (item) => {return $(item).text()})", "_self.getTotalSize(query)"]
},
"seeding": {
"selector": "#SeedingTorrents > div > table > tbody > tr:not(:first-of-type)",
"filters": ["query.length"]
}
}
}
},
"categories": [
{
"entry": "*",
"result": "&c$id$=1",
"category": [
{ "id": "62", "name": "Amateur" },
{ "id": "29", "name": "Anal" },
{ "id": "46", "name": "Anime & Games" },
{ "id": "30", "name": "Asian" },
{ "id": "43", "name": "Bareback" },
{ "id": "19", "name": "BDSM" },
{ "id": "17", "name": "Bears" },
{ "id": "44", "name": "Black" },
{ "id": "50", "name": "Books & Magazines" },
{ "id": "9", "name": "Chubbies" },
{ "id": "7", "name": "Clips" },
{ "id": "48", "name": "Comic & Yaoi" },
{ "id": "5", "name": "Daddies / Sons" },
{ "id": "67", "name": "Dildos" },
{ "id": "66", "name": "Fan Sites" },
{ "id": "34", "name": "Fetish" },
{ "id": "68", "name": "Fisting" },
{ "id": "27", "name": "Grey / Older" },
{ "id": "32", "name": "Group-Sex" },
{ "id": "63", "name": "Homemade" },
{ "id": "12", "name": "Hunks" },
{ "id": "33", "name": "Images" },
{ "id": "53", "name": "Interracial" },
{ "id": "57", "name": "Jocks" },
{ "id": "35", "name": "Latino" },
{ "id": "36", "name": "Mature" },
{ "id": "58", "name": "Media Programs" },
{ "id": "37", "name": "Member" },
{ "id": "54", "name": "Middle Eastern" },
{ "id": "38", "name": "Military" },
{ "id": "39", "name": "Oral-Sex" },
{ "id": "56", "name": "Softcore" },
{ "id": "40", "name": "Solo" },
{ "id": "45", "name": "Themed Movie" },
{ "id": "47", "name": "Trans" },
{ "id": "1", "name": "TV / Episodes" },
{ "id": "41", "name": "Twinks" },
{ "id": "42", "name": "Vintage" },
{ "id": "51", "name": "Voyeur" },
{ "id": "65", "name": "Wrestling and Sports" },
{ "id": "28", "name": "Youngblood" }
]
}
]
}
================================================
FILE: resource/sites/www.gaytor.rent/getSearchResult.js
================================================
(function (options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
this.categories = {};
if (/login\.php/.test(options.responseText)) {
options.status = ESearchResultParseStatus.needLogin;
return;
}
options.isLogged = true;
this.haveData = true;
}
getResult() {
if (!this.haveData) {
return [];
}
let site = options.site;
let selector = options.resultSelector;
let table = options.page.find(selector);
let rows = table.find('> tbody > tr');
if (rows.length <= 1) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;
return [];
}
let results = [];
try {
for (let index = 1; index < rows.length; index++) {
const row = rows.eq(index);
let title_elem = row.find('.torrent_title > .torrent_title').first();
if (title_elem.length == 0) {
continue;
}
let time = row.find('.tadded').first().text()
let peers = row.find('.hidden-xs.hidden-sm.biggerfont').first().text().match(/[\d,]+/g)
let comments = row.find('.tcomments').first().text().split(/\s/)[0];
let category = options.searcher.getCategoryById(
site,
options.url,
row.find('.browsemaincat > a').first().attr('href').split('=')[1]
)
let tags = []
if (row.find('.infocol > div[onmouseover] > font[color=yellow]').length > 0) {
tags.push({ name: 'Free', color: 'blue' })
}
if (title_elem.text().startsWith('♺')) {
tags.push({ name: 'Bumped', color: 'grey' })
}
let data = {
title: title_elem.text().replace(/^♺ /g, ''),
link: `${site.url}${title_elem.attr("href")}`,
url: `${site.url}${row.find('.index').first().attr('href')}`,
size: row.find('.tsize').first().text(),
time: `${time.match(/\d{4}-\d{2}-\d{2}/g)[0]} ${time.match(/\d{2}:\d{2}:\d{2}/g)[0]}`,
author: '(Anonymous)',
seeders: peers[1],
leechers: peers[2],
completed: peers[0],
comments: comments ? comments : 0,
site: site,
tags: tags,
entryName: options.entry.name,
category: category.id ? category : { id: "-1", "name": "Porn" },
status: options.searcher.getFieldValue(site, row, "status")
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
}
} catch (error) {
console.log(error);
options.status = ESearchResultParseStatus.parseError;
options.errorMsg = error.stack;
}
return results;
}
}
let parser = new Parser(options);
options.results = parser.getResult();
console.log(options.results);
})(options, Searcher);
================================================
FILE: resource/sites/www.haidan.video/config.json
================================================
{
"name": "HaiDan",
"schema": "NexusPHP",
"url": "https://www.haidan.video/",
"description": "海胆之家",
"icon": "https://www.haidan.video/public/pic/favicon.ico",
"tags": [ "影视", "综合" ],
"host": "www.haidan.video",
"levelRequirements": [
{
"level": 1,
"name": "Power User",
"interval": "2",
"ratio": "1",
"classPoints": "100",
"privilege": "允许购买邀请码,可以直接发布种子,可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "4",
"ratio": "1",
"classPoints": "200",
"privilege": "Elite User允许发送邀请码,并拥有低于该等级以下权限。"
},
{
"level": 3,
"name": "Crazy User",
"interval": "8",
"ratio": "1",
"classPoints": "500",
"privilege": "查看种子结构,并拥有低于该等级以下权限。"
},
{
"level": 4,
"name": "Insane User",
"interval": "16",
"ratio": "1",
"classPoints": "1000",
"privilege": "发布趣味盒,并拥有低于该等级以下权限。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "28",
"ratio": "1",
"classPoints": "2000",
"privilege": "Veteran User永远保留账号,并拥有低于该等级以下权限。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "32",
"ratio": "1",
"classPoints": "5000",
"privilege": "查看日志权限,并拥有低于该等级以下权限。"
},
{
"level": 7,
"name": "Ultimate User",
"interval": "40",
"ratio": "1",
"classPoints": "8000",
"privilege": "查看排行榜,并拥有低于该等级以下权限"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "52",
"ratio": "1",
"classPoints": "10000",
"privilege": "允许匿名,拥有发布主题推荐权限,并拥有低于该等级以下权限"
}
],
"collaborator": "rsj",
"ver": "1.0",
"plugins": [{
"name": "种子详情页面",
"pages": ["/details.php"],
"scripts": ["common.js", "details.js"]
}, {
"name": "种子列表",
"pages": ["/torrents.php", "/videos.php"],
"scripts": ["common.js", "torrents.js"]
}],
"securityKeyFields": ["passkey"],
"searchEntryConfig": {
"fieldSelector": {
"title": {
"selector": [".video_name_str"]
},
"subTitle": {
"selector": [".torrent_name_col a"]
},
"seeders": {
"selector": [".seeder_col"]
},
"leechers": {
"selector": [".leecher_col"]
},
"completed": {
"selector": [".snatched_col"]
},
"size": {
"selector": [".video_size"]
},
"author": {
"selector": [".username-center a b"]
},
"time": {
"selector": [".time_col span[title]"],
"filters": ["query.attr('title')"]
},
"link_path": {
"selector": [".torrent_name_col a"],
"filters": ["query.attr('href')"]
},
"url_path": {
"selector": [".fa-download"],
"filters": ["query.parent().attr('href')"]
},
"category_link_parameters": {
"selector": [".img_blurry a"],
"filters": ["query.attr('href')"]
},
"category_name": {
"selector": [".img_blurry a img"],
"filters": ["query.attr('title')"]
},
"progress": {
"selector": ["progress"],
"filters": ["query.attr('data-label')","query==null?null:query.replace('%','')"]
},
"status": {
"selector": ["progress"],
"filters": ["query.attr('data-label')","query==null?null:(query.replace('%','')==100?2:1)"]
}
},
"page": "torrents.php",
"queryString": "search=$key$",
"area": [{
"name": "标题",
"appendQueryString": "&search_area=0"
}, {
"name": "简介",
"appendQueryString": "&search_area=1"
}, {
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"appendQueryString": "&search_area=4"
}],
"resultType": "html",
"parseScriptFile": "getSearchResult.js"
},
"searchEntry": [{
"name": "全站",
"enabled": true
}],
"checker": {
"isLogin": {
"page": "/usercp.php",
"contains": "logout.php"
}
},
"torrentTagSelectors": [{
"name": "Free",
"selector": "img.pro_free"
}, {
"name": "2xFree",
"selector": "img.pro_free2up"
}, {
"name": "2xUp",
"selector": "img.pro_2up"
}, {
"name": "2x50%",
"selector": "img.pro_50pctdown2up"
}, {
"name": "30%",
"selector": "img.pro_30pctdown"
}, {
"name": "50%",
"selector": "img.pro_50pctdown"
}, {
"name": "H&R",
"color": "black",
"selector": "img[src='public/pic/hit_run.gif']"
}],
"selectors": {
"userBaseInfo": {
"merge": true,
"fields": {
"classPoints": {
"selector": ["a[href='classpoint.php']+span"],
"filters": ["query.text().replace(/\\D/g,'')", "query ? parseInt(query) : 0"]
}
}
}
}
}
================================================
FILE: resource/sites/www.haidan.video/getSearchResult.js
================================================
(function (options, Searcher) {
class Parser {
constructor() {
this.haveData = false;
if (/takelogin\.php| |