Skip to content

Commit

Permalink
Merge pull request #2 from wegood9/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
wegood9 authored Mar 24, 2024
2 parents 785606a + 7a9878f commit 0e57ea1
Show file tree
Hide file tree
Showing 17 changed files with 699 additions and 151 deletions.
25 changes: 14 additions & 11 deletions resource/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,11 @@
"ok": "@:(common.ok)",
"cancel": "@:(common.cancel)",
"download": "Download again",
"downloadSelectedConfirm": "Are you sure you want to download these torrents again?",
"filterServer": "Filter server",
"fail": "Failure",
"success": "Success",
"all": "All",
"unknown": "N/A",
"defaultPath": "Default Path",
"seedingTorrent": "Sending torrents to download server...",
Expand All @@ -171,7 +174,7 @@
"levelRequirements": "Level requirements",
"seedingPoints": "Seeding Points",
"showHnR": "H&R",
"showLastUpdateTimeAsRelativeTime":"Last update time as relative time",
"showLastUpdateTimeAsRelativeTime": "Last update time as relative time",
"selectColumns": "Select Columns",
"selectedTags": "Selected Tags",
"week": "Expressed in weeks",
Expand All @@ -188,7 +191,7 @@
"getUserInfoError": "An error occurred",
"getUserInfoAbort": "Get user profile request has been canceled. ({siteName})",
"getUserInfoAbortError": "Cancellation failed to get user profile request. ({siteName})",
"offline":"Offline",
"offline": "Offline",
"torrents": "Torrents",
"mailbox": "MailBox",
"control_panel": "ControlPanel",
Expand Down Expand Up @@ -218,7 +221,7 @@
"comments": "Comments",
"uploads": "Uploaded",
"trueDownloaded": "True Downloaded",
"totalTraffic":"Total Traffic",
"totalTraffic": "Total Traffic",
"classPoints": "Class Points",
"unsatisfieds": "Unsatisfieds",
"prewarn": "H&R Prewarn"
Expand All @@ -243,12 +246,12 @@
"status": "Status",
"comments": "Comments",
"uploaded": "Uploaded",
"downloaded":"Downloaded",
"downloaded": "Downloaded",
"uploads": "Uploaded",
"totalSeedtime":"totalSeedtime",
"snatches":"snatched",
"totalSeedtime": "totalSeedtime",
"snatches": "snatched",
"trueDownloaded": "True Downloaded",
"totalTraffic":"Total Traffic",
"totalTraffic": "Total Traffic",
"classPoints": "Class Points",
"uniqueGroups": "Unique Groups",
"perfectFLAC": "\"Perfect\" FLAC",
Expand Down Expand Up @@ -317,7 +320,7 @@
},
"updateat": "Update at: ",
"user": {
"uploads":"Uploads: ",
"uploads": "Uploads: ",
"uploaded": "Uploaded: ",
"downloaded": "Downloaded: ",
"seedingSize": "Seeding size: ",
Expand Down Expand Up @@ -511,7 +514,7 @@
"autoRefreshUserDataTip3": "Retry",
"autoRefreshUserDataTip4": "times after failure,",
"autoRefreshUserDataTip5": "minute apart",
"autoRefreshByAlarmTip1": "Using the new version refresh method, more stable, requires corresponding authorization (Beta)",
"autoRefreshByAlarmTip1": "Using the new version refresh method, more stable, requires corresponding authorization(Chromium Only) (Beta)",
"autoBackupDataTip1": "Automatically backup user data when the browser is open(Beta)",
"autoBackupDataTip2": "Auto upload after ",
"autoBackupDataTip3": "automatically refreshes",
Expand Down Expand Up @@ -1070,7 +1073,7 @@
"sendConfirm": "Are you sure you want to send these {count} torrents?",
"addToKeepUpload": "Add to task list",
"removeFromKeepUpload": "Remove from task list",
"redownload" : "Re-download",
"redownload": "Re-download",
"addToKeepUploadConfirm": "Are you sure want add this torrent to task list?",
"status": {
"label": "Status: ",
Expand Down Expand Up @@ -1103,4 +1106,4 @@
}
}
}
}
}
21 changes: 12 additions & 9 deletions resource/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,11 @@
"ok": "@:(common.ok)",
"cancel": "@:(common.cancel)",
"download": "重新下载",
"downloadSelectedConfirm": "确认要重新下载这些种子吗?",
"filterServer": "过滤服务器",
"fail": "失败",
"success": "成功",
"all": "所有",
"unknown": "N/A",
"defaultPath": "默认目录",
"seedingTorrent": "正在发送种子到下载服务器……",
Expand Down Expand Up @@ -185,7 +188,7 @@
"getUserInfoError": "发生错误",
"getUserInfoAbort": "{siteName} 获取用户资料请求已取消",
"getUserInfoAbortError": "{siteName} 获取用户资料请求取消失败",
"offline":"已离线",
"offline": "已离线",
"torrents": "种子页",
"mailbox": "收件箱",
"control_panel": "控制面板",
Expand Down Expand Up @@ -214,7 +217,7 @@
"status": "状态",
"uploads": "发布数",
"trueDownloaded": "真实下载",
"totalTraffic":"总流量",
"totalTraffic": "总流量",
"classPoints": "等级积分",
"unsatisfieds": "H&R考核中",
"prewarn": "H&R预警"
Expand All @@ -238,11 +241,11 @@
"lastUpdateTime": "数据更新于",
"status": "状态",
"uploaded": "上传量",
"downloaded":"下载量",
"downloaded": "下载量",
"uploads": "发布数",
"snatches":"完成数",
"snatches": "完成数",
"trueDownloaded": "真实下载",
"totalTraffic":"总流量",
"totalTraffic": "总流量",
"classPoints": "等级积分",
"posts": "论坛帖子",
"uniqueGroups": "独特分组",
Expand Down Expand Up @@ -311,7 +314,7 @@
},
"updateat": "数据更新于:",
"user": {
"uploads":"发布数:",
"uploads": "发布数:",
"uploaded": "上传量:",
"downloaded": "下载量:",
"seedingSize": "做种量:",
Expand Down Expand Up @@ -505,7 +508,7 @@
"autoRefreshUserDataTip3": "失败后重试",
"autoRefreshUserDataTip4": "次,每次间隔",
"autoRefreshUserDataTip5": "分钟",
"autoRefreshByAlarmTip1": "使用新版刷新方式, 更稳定, 需要对应授权(Beta)",
"autoRefreshByAlarmTip1": "使用新版刷新方式, 更稳定, 需要对应授权(仅适配 Chrome 内核)(Beta)",
"autoBackupDataTip1": "在浏览器打开的情况下自动上传用户数据(Beta)",
"autoBackupDataTip2": "自动刷新数据后间隔",
"autoBackupDataTip3": "分钟, 上传数据到",
Expand Down Expand Up @@ -1065,7 +1068,7 @@
"sendConfirm": "是否确认要发送这 {count} 个种子?",
"addToKeepUpload": "添加至辅种列表",
"removeFromKeepUpload": "移除种子",
"redownload" : "重新下载",
"redownload": "重新下载",
"addToKeepUploadConfirm": "该种子未能通过初步校验,确认要添加吗?",
"status": {
"label": "状态:",
Expand Down Expand Up @@ -1099,4 +1102,4 @@
}
}
}
}
}
6 changes: 3 additions & 3 deletions resource/sites/discfan.net/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
},
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"merge": true,
"fields": {
"seeding": {
"selector": ["div b:first"],
Expand All @@ -122,8 +122,8 @@
"seedingSize": {
"selector": "div div:first",
"filters": [
"query.text().match(/總大小:(.*?)B/g)",
"(query && query.length>0) ? query[0].replace('總大小:', '').trim() : 0",
"query.text().match(/(總大小:|总大小:|Total size:)(.*?B)/i)",
"(query && query.length>0) ? query[2].trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
Expand Down
112 changes: 112 additions & 0 deletions resource/sites/kufirc.com/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"name": "Kufirc",
"url": "https://kufirc.com/",
"icon": "https://kufirc.com/favicon.ico",
"host": "kufirc.com",
"schema": "kufirc",
"tags": ["成人"],
"collaborator": "haowenwu",
"levelRequirements": [
{
"level": 1,
"name": "Pályakezdö",
"interval": "1",
"uploaded": "10 GB",
"ratio": "1.0"
},
{
"level": 2,
"name": "Perverz",
"interval": "4",
"uploaded": "25 GB",
"ratio": "1.05"
},
{
"level": 3,
"name": "Szexmester",
"interval": "13",
"uploaded": "1 TB",
"ratio": "1.05"
},
{
"level": 4,
"name": "Veterán",
"interval": "26",
"uploaded": "10 TB",
"ratio": "1.05"
},
{
"level": 5,
"name": "Legenda",
"interval": "50",
"uploaded": "30 TB",
"ratio": "2.05"
}
],
"searchEntry": [],
"searchEntryConfig": {
"page": "/torrents.php",
"queryString": "title=$key$",
"resultType": "html",
"parseScriptFile": "getSearchResult.js"
},
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": ["a[href*=user]"],
"attribute": "href",
"filters": ["query.match(/\\d+/)[0]"]
},
"name": {
"selector": ".username"
},
"bonus": {
"selector": [".stat:eq(0)"]
},
"uploaded": {
"selector": [".stat:eq(1)"],
"filters":["query.text().sizeToNumber()"]
},
"downloaded": {
"selector": [".stat:eq(3)"],
"filters":["query.text().sizeToNumber()"]
},
"seeding": {
"selector": ["#nav_seeding_r"]
},
"leeching": {
"selector": ["#nav_leeching"],
"filters": ["query.match(/\\d+/)[0]"]
}
}
},
"userExtendInfo": {
"page": "/user.php?id=$user.id$",
"fields": {
"levelName": {
"selector": [".rank"]
},
"uploads": {
"selector": [".stats:eq(3) > li:eq(8)"],
"filters": ["query.match(/\\d+/)[0]"]
},
"joinTime": {
"selector": [".time:eq(1)"],
"attribute": "title",
"filters": ["dateTime(query).valueOf()"]
}
}
},
"userSeedingTorrents": {
"page": "/torrents.php?type=seeding&userid=$user.id$",
"fields": {
"seedingSize": {
"selector": [".head:eq(1)"],
"filters": ["query.text().match(/Size: (.*)/)[1].sizeToNumber()"]
}
}
}
}
}
68 changes: 68 additions & 0 deletions resource/sites/kufirc.com/getSearchResult.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
(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 rows = options.page.find('#torrent_table > tbody > .torrent');
if (rows.length == 0) {
options.status = ESearchResultParseStatus.torrentTableIsEmpty;
return [];
}
let results = [];

try {
for (let index = 0; index < rows.length; index++) {
const row = rows.eq(index);

let title_elem = row.find('a[onmouseover*=return]').first();
if (title_elem.length == 0) {
continue;
}
let download_elem = row.find('a[href*=download]').first();

let data = {
category: { "name": row.find('td').first().find('div').first().attr('title') },
title: title_elem.text(),
link: `${site.url}${title_elem.attr('href')}`,
url: `${site.url}${download_elem.attr('href')}`,
size: row.find('td').eq(5).text(),
completed: row.find('td').eq(6).text(),
seeders: row.find('td').eq(7).text(),
leechers: row.find('td').eq(8).text(),
author: row.find('td').eq(9).text(),
time: row.find('.time').first().attr('title'),
tags: row.find('img[alt=Freeleech]').length ? [{ name: 'Free', color: 'blue' }] : [],
site: site,
entryName: options.entry.name
};
results.push(data);
}
if (results.length == 0) {
options.status = ESearchResultParseStatus.noTorrents;
}
} catch (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);

17 changes: 17 additions & 0 deletions resource/sites/pt.0ff.cc/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,23 @@
}
],
"collaborator": "koal",
"plugins": [
{
"isCustom": true,
"name": "特别区",
"pages": [
"/special.php"
],
"readonly": false,
"script": "",
"scripts": [
"/schemas/nexusPHP/common.js",
"/schemas/nexusPHP/torrents.js"
],
"style": "",
"styles": []
}
],
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
Expand Down
Loading

0 comments on commit 0e57ea1

Please sign in to comment.