diff --git a/resource/schemas/Common/getSearchResult.js b/resource/schemas/Common/getSearchResult.js index 40aa34e12..e2be03c47 100644 --- a/resource/schemas/Common/getSearchResult.js +++ b/resource/schemas/Common/getSearchResult.js @@ -25,6 +25,7 @@ * 获取搜索结果 */ getResult() { + console.log("Common schemas search js"); if (!this.haveData) { return []; } diff --git a/resource/schemas/GazelleJSONAPI/getSearchResult.js b/resource/schemas/GazelleJSONAPI/getSearchResult.js index 25e75dabe..8801fc1f5 100644 --- a/resource/schemas/GazelleJSONAPI/getSearchResult.js +++ b/resource/schemas/GazelleJSONAPI/getSearchResult.js @@ -51,7 +51,7 @@ let results = []; let authkey = this.authkey; let passkey = this.passkey; - console.log("groups.length", groups.length); + //console.log("groups.length", groups.length); try { groups.forEach(group => { if (group.hasOwnProperty("torrents")) { @@ -59,29 +59,22 @@ torrents.forEach(torrent => { let data = { title: - group.artist + - " - " + + (group.artist ? group.artist + " - " : "") + group.groupName + - " [" + - group.groupYear + - "] [" + - group.releaseType + - "]", - subTitle: - torrent.format + " / " + - torrent.encoding + + group.groupYear + " / " + torrent.media + - (torrent.hasLog ? ` / Log(${torrent.logScore})` : "") + + (group.releaseType ? " / " + group.releaseType : "") + + (torrent.format ? " / " + torrent.format : " / " + torrent.codec) + + (torrent.encoding ? " / " + torrent.encoding : " / " + torrent.resolution), + + subTitle: + (torrent.container ? torrent.container: "") + + (torrent.hasLog ? `Log(${torrent.logScore})` : "") + (torrent.hasCue ? " / Cue" : "") + - (torrent.remastered ? ` / ${torrent.remasterYear} / ${torrent.remasterTitle}` : "") + - (torrent.scene ? " / Scene" : "") + - (torrent.isFreeleech || - torrent.isNeutralLeech || - torrent.isPersonalFreeleech - ? " / Freeleech" - : ""), + (torrent.remastered ? ` / Remaster / ${torrent.remasterYear} / ${torrent.remasterTitle}` : "") + + (torrent.scene ? " / Scene" : ""), 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), @@ -90,6 +83,7 @@ leechers: torrent.leechers, completed: torrent.snatches, site: site, + tags: (torrent.isFreeleech || torrent.isPersonalFreeleech) ? [{name: "Free",color: "blue"}] : torrent.isNeutralLeech ? [{name: "Neutral",color: "purple"}] : [], entryName: options.entry.name, category: group.releaseType }; diff --git a/resource/schemas/IPTorrents/config.json b/resource/schemas/IPTorrents/config.json deleted file mode 100644 index 6e53d8776..000000000 --- a/resource/schemas/IPTorrents/config.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "name": "IPTorrents", - "ver": "0.0.1", - "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": "/schemas/IPTorrents/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"] - } - } - } - } -} \ No newline at end of file diff --git a/resource/schemas/NexusPHP/getSearchResult.js b/resource/schemas/NexusPHP/getSearchResult.js index a18af3654..099e50757 100644 --- a/resource/schemas/NexusPHP/getSearchResult.js +++ b/resource/schemas/NexusPHP/getSearchResult.js @@ -419,10 +419,11 @@ switch (options.site.host) { case 'hdsky.me': { let url_another = row.find('form[action*="download.php"]:eq(0)') - if (url_another) { + if (url_another.length > 0) { url = url_another.attr('action') + break; } - break; + } default: { diff --git a/resource/sites/aidoru-online.me/config.json b/resource/sites/aidoru-online.me/config.json index 3a300da97..184c9005c 100644 --- a/resource/sites/aidoru-online.me/config.json +++ b/resource/sites/aidoru-online.me/config.json @@ -139,11 +139,11 @@ }, "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():0"] + "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():0"] + "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"], @@ -167,7 +167,7 @@ }, "seeding": { "selector": ["b:contains('Currently seeding')"], - "filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"] + "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)"], diff --git a/resource/sites/animebytes.tv/config.json b/resource/sites/animebytes.tv/config.json index d8ee21cf6..fbe467eb3 100644 --- a/resource/sites/animebytes.tv/config.json +++ b/resource/sites/animebytes.tv/config.json @@ -86,7 +86,7 @@ "selector": ["dt:contains('Seeding:') + dd"], "filters": [ "query.text().trim().replace(/,|\\n/g,'').match(/([\\d.]+)/)", - "(query && query.length>=2)?parseFloat(query[1]):0" + "(query && query.length>=2)?parseFloat(query[1]):null" ] }, "seedingSize": { diff --git a/resource/sites/anthelion.me/config.json b/resource/sites/anthelion.me/config.json index ab7edbefc..0366e6c40 100644 --- a/resource/sites/anthelion.me/config.json +++ b/resource/sites/anthelion.me/config.json @@ -26,7 +26,7 @@ }, "bonus": { "selector": ["a[href*='store.php']"], - "filters": ["query.text().replace(/,/g,'').match(/.+?([\\d.]+)/)", "(query && query.length>=2)?query[1]:0"] + "filters": ["query.text().replace(/,/g,'').match(/.+?([\\d.]+)/)", "(query && query.length>=2)?query[1]:null"] } } } diff --git a/resource/sites/avgv.cc/config.json b/resource/sites/avgv.cc/config.json deleted file mode 100644 index aa5a748e1..000000000 --- a/resource/sites/avgv.cc/config.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "爱薇网", - "timezoneOffset": "+0800", - "schema": "NexusPHP", - "url": "https://avgv.cc/", - "description": "新加坡华人PT站,很有特色。", - "tags": ["成人", "AV", "GAY", "LES"], - "host": "avgv.cc", - "collaborator": ["xiazhou8", "匿名网友"], - "plugins": [{ - "name": "种子列表", - "pages": ["/AV.php", "/GV.php", "/LES.php"], - "scripts": ["/schemas/NexusPHP/common.js", "/schemas/NexusPHP/torrents.js"] - }, { - "name": "种子列表封面模式", - "pages": ["/torrents.php", "/AV.php", "/GV.php", "/LES.php"], - "scripts": ["/libs/album/album.js", "torrents.js"], - "styles": ["/libs/album/style.css"] - }], - "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": ["img[src='pic/ZZ.png']", "div.probar_b1", "img[src='pic/WWC.png'], img[src='pic/WC.png']"], - "switchFilters": [ - ["2"], - ["1"], - ["255"] - ] - } - } - } -} diff --git a/resource/sites/avgv.cc/torrents.js b/resource/sites/avgv.cc/torrents.js deleted file mode 100644 index 1db12183f..000000000 --- a/resource/sites/avgv.cc/torrents.js +++ /dev/null @@ -1,35 +0,0 @@ -(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 = $(".torrentimg .list > img", 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: href, - }); - }); - - // 创建预览 - new album({ - images: images, - onClose: () => { - PTService.buttonBar.show(); - }, - }); - success(); - PTService.buttonBar.hide(); - }, - }); -})(jQuery, window); diff --git a/resource/sites/baconbits.org/config.json b/resource/sites/baconbits.org/config.json index 1bc9b4157..54369d6b1 100644 --- a/resource/sites/baconbits.org/config.json +++ b/resource/sites/baconbits.org/config.json @@ -50,7 +50,7 @@ "selector": ["li:contains('Seeding:')"], "filters": [ "query.text().trim().replace(/,|\\n/g,'').match(/:.+?([\\d.]+)/)", - "(query && query.length>=2)?parseFloat(query[1]):0" + "(query && query.length>=2)?parseFloat(query[1]):null" ] }, "seedingSize": { diff --git a/resource/sites/beyond-hd.me/config.json b/resource/sites/beyond-hd.me/config.json index c63665bfa..5284071f9 100644 --- a/resource/sites/beyond-hd.me/config.json +++ b/resource/sites/beyond-hd.me/config.json @@ -72,11 +72,11 @@ }, "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():0"] + "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():0"] + "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"], diff --git a/resource/sites/bibliotik.me/config.json b/resource/sites/bibliotik.me/config.json index 3930f9604..61b6d03a3 100644 --- a/resource/sites/bibliotik.me/config.json +++ b/resource/sites/bibliotik.me/config.json @@ -95,11 +95,11 @@ "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():0"] + "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():0"] + "filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"] }, "levelName": { "selector": ["#detailsbox p:contains('Class: ')"], diff --git a/resource/sites/broadcasthe.net/config.json b/resource/sites/broadcasthe.net/config.json index 8bb46bec6..9582ed3c0 100644 --- a/resource/sites/broadcasthe.net/config.json +++ b/resource/sites/broadcasthe.net/config.json @@ -50,14 +50,14 @@ "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():0" + "(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():0" + "(query && query.length>=2)?(query[1]).sizeToNumber():null" ] }, "ratio": { @@ -87,7 +87,7 @@ "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]):0" + "(query && query.length>=2)?(query[1]):null" ] }, "seedingSize": { diff --git a/resource/sites/bt.neu6.edu.cn/config.json b/resource/sites/bt.neu6.edu.cn/config.json index d58d4895a..b88628559 100644 --- a/resource/sites/bt.neu6.edu.cn/config.json +++ b/resource/sites/bt.neu6.edu.cn/config.json @@ -49,7 +49,7 @@ ], "filters": [ "query.text().match(/上传.*?([\\d.]+ ?[ZEPTGMK]?i?B)/)", - "(query && query.length>=2)?(query[1]).sizeToNumber():0" + "(query && query.length>=2)?(query[1]).sizeToNumber():null" ] }, "downloaded": { @@ -58,7 +58,7 @@ ], "filters": [ "query.text().match(/下载.*?([\\d.]+ ?[ZEPTGMK]?i?B)/)", - "(query && query.length>=2)?(query[1]).sizeToNumber():0" + "(query && query.length>=2)?(query[1]).sizeToNumber():null" ] }, "levelName": { diff --git a/resource/sites/bwtorrents.tv/config.json b/resource/sites/bwtorrents.tv/config.json index d385d64a9..d0bc7777b 100644 --- a/resource/sites/bwtorrents.tv/config.json +++ b/resource/sites/bwtorrents.tv/config.json @@ -96,11 +96,11 @@ "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():0"] + "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():0"] + "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" diff --git a/resource/sites/cinemageddon.net/config.json b/resource/sites/cinemageddon.net/config.json index d4363cb38..4c38b45e2 100644 --- a/resource/sites/cinemageddon.net/config.json +++ b/resource/sites/cinemageddon.net/config.json @@ -46,11 +46,11 @@ "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():0"] + "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():0"] + "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" diff --git a/resource/sites/club.hares.top/config.json b/resource/sites/club.hares.top/config.json index 182ba62ee..1b0d70e83 100644 --- a/resource/sites/club.hares.top/config.json +++ b/resource/sites/club.hares.top/config.json @@ -4,240 +4,215 @@ "description": "2160p/4k 及以上的高清资源站点", "url": "https://club.hares.top/", "icon": "https://club.hares.top/favicon.ico", - "tags": [ - "影视", - "纪录片", - "综合" - ], + "tags": ["影视", "纪录片", "综合"], "schema": "NexusPHP", "host": "club.hares.top", - "collaborator": [ - "kevgao", - "枕头啊枕头", - "bright" - ], + "collaborator": ["kevgao", "枕头啊枕头", "bright"], "formerHosts": [], "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 ? 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 + "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"] }, - { - "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 + "subTitle": { + "selector": ["p.layui-elip.layui-torrents-descr-width:first"], + "filters": ["query.text()"] }, - { - "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 + "progress": { + "selector": [ + "div[title^='leeching'], div[title^='seeding'], div[title^='inactivity']" + ], + "filters": [ + "query ? query.attr('title').replace('leeching','').replace('seeding','').replace('inactivity','').replace('%','').trim() : null" + ] }, - { - "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 + "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": { + "selectors": { "userBaseInfo": { - "merge":true, + "merge": true, "fields": { "messageCount": { "selector": [".unread"], - "filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"] + "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():0" - ] - }, - "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():0" - ] - }, - "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()" - ] - } - } - }, - "userSeedingTorrents": { - "page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding", - "fields": { - "seedingSize": { - "selector": "", - "filters": [ - "query.text().match(/总大小:(.*?)类型/g)", - "(query && query.length>0 ) ? query[0].replace('总大小:', '').replace('类型', '').trim() : 0", - "(query != 0) ? query.sizeToNumber() : 0" - ] - }, - "seeding": { - "selector": "", - "filters": [ - "query.text().match(/(.*?)条记录/g)", - "(query && query.length>0 ) ? query[0].replace('条记录', '').trim() : 0", - "(query != 0) ? query : 0" - ] - } - } - } - }, - "plugins": [ - { - "name": "官方列表", - "pages": [ - "/official.php" + "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()"] + } } + }, + "userSeedingTorrents": { + "page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding", + "fields": { + "seedingSize": { + "selector": "", + "filters": [ + "query.text().match(/总大小:(.*?)类型/g)", + "(query && query.length>0 ) ? query[0].replace('总大小:', '').replace('类型', '').trim() : 0", + "(query != 0) ? query.sizeToNumber() : 0" + ] + }, + "seeding": { + "selector": "", + "filters": [ + "query.text().match(/(.*?)条记录/g)", + "(query && query.length>0 ) ? query[0].replace('条记录', '').trim() : 0", + "(query != 0) ? query : 0" + ] + } + } + } + }, + "plugins": [ + { + "name": "官方列表", + "pages": ["/official.php"], + "scripts": [ + "/schemas/NexusPHP/common.js", + "/schemas/NexusPHP/torrents.js" + ] + } ], "mergeSchemaTagSelectors": true -} \ No newline at end of file +} diff --git a/resource/sites/cnlang.org/config.json b/resource/sites/cnlang.org/config.json deleted file mode 100644 index b13fca8b9..000000000 --- a/resource/sites/cnlang.org/config.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "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)"] - } - } - } - } - } \ No newline at end of file diff --git a/resource/sites/cnlang.org/getUserSeedingTorrents.js b/resource/sites/cnlang.org/getUserSeedingTorrents.js deleted file mode 100644 index 5f758d663..000000000 --- a/resource/sites/cnlang.org/getUserSeedingTorrents.js +++ /dev/null @@ -1,126 +0,0 @@ -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) 类实例 - */ \ No newline at end of file diff --git a/resource/sites/concertos.live/config.json b/resource/sites/concertos.live/config.json index 40efec7f4..f2da014c2 100644 --- a/resource/sites/concertos.live/config.json +++ b/resource/sites/concertos.live/config.json @@ -80,11 +80,11 @@ }, "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():0"] + "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():0"] + "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"], @@ -110,7 +110,7 @@ }, "seeding": { "selector": ["td:contains('Total Seeding') + td"], - "filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"] + "filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):null"] }, "seedingSize": { "value": -1 diff --git a/resource/sites/dicmusic.club/config.json b/resource/sites/dicmusic.club/config.json index 190575d04..82c58a89b 100644 --- a/resource/sites/dicmusic.club/config.json +++ b/resource/sites/dicmusic.club/config.json @@ -21,7 +21,7 @@ }, "bonus": { "selector": ["div#content > div.header > h3"], - "filters": ["query.text().replace(/,/g,'').match(/.+?([\\d.]+)/)", "(query && query.length>=2)?query[1]:0"] + "filters": ["query.text().replace(/,/g,'').match(/.+?([\\d.]+)/)", "(query && query.length>=2)?query[1]:null"] } } } diff --git a/resource/sites/extremlymtorrents.ws/config.json b/resource/sites/extremlymtorrents.ws/config.json index 89edc719b..ad573e02c 100644 --- a/resource/sites/extremlymtorrents.ws/config.json +++ b/resource/sites/extremlymtorrents.ws/config.json @@ -99,11 +99,11 @@ "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():0"] + "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():0"] + "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" diff --git a/resource/sites/filelist.io/config.json b/resource/sites/filelist.io/config.json index bd5b00a7e..8059a1127 100644 --- a/resource/sites/filelist.io/config.json +++ b/resource/sites/filelist.io/config.json @@ -36,12 +36,12 @@ "page": "/index.php", "fields": { "id": { - "selector": "a[href*='userdetails.php']:last", + "selector": "a[href*='userdetails.php']:first", "attribute": "href", "filters": ["query ? query.getQueryString('id'):''"] }, "name": { - "selector": "a[href*='userdetails.php']:last" + "selector": "a[href*='userdetails.php']:eq(1)" }, "isLogged": { "selector": ["a[href*='logout.php']"], diff --git a/resource/sites/gazellegames.net/config.json b/resource/sites/gazellegames.net/config.json index f10b93fcb..1a62627cb 100644 --- a/resource/sites/gazellegames.net/config.json +++ b/resource/sites/gazellegames.net/config.json @@ -16,25 +16,26 @@ "queryString": "searchstr=$key$", "fieldSelector": { "progress": { - "selector": ["#color_seeding, #color_snatched", "#color_leeching, #color_downloaded", ""], - "switchFilters": [ - ["100"], - ["0"], - ["null"] - ] + "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"] - ] + "selector": [ + "#color_seeding", + "#color_snatched", + "#color_leeching", + "#color_downloaded" + ], + "switchFilters": [["2"], ["255"], ["1"], ["3"]] } } }, - "searchEntry": [{ + "searchEntry": [ + { "name": "all", "enabled": true }, @@ -65,13 +66,16 @@ } ], "selectors": { - "userBaseInfo": { + "userBaseInfo": { "merge": true, "page": "/index.php", "fields": { "messageCount": { "selector": [".newnoti"], - "filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"] + "filters": [ + "query.text().match(/(\\d+)/)", + "(query && query.length>=2)?parseInt(query[1]):0" + ] } } }, @@ -88,14 +92,22 @@ }, "levelName": { "selector": "div:contains('Personal') + ul.stats > li:contains('Class:')", - "filters": ["query.text().match(/Class:.+?(.+)/)", "(query && query.length>=2)?query[1]:''"] + "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"] + "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"] @@ -107,7 +119,20 @@ } } }, + "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 } -} \ No newline at end of file +} diff --git a/resource/sites/hd-space.org/config.json b/resource/sites/hd-space.org/config.json index 079c219b3..807f7e8a6 100644 --- a/resource/sites/hd-space.org/config.json +++ b/resource/sites/hd-space.org/config.json @@ -86,11 +86,11 @@ }, "uploaded": { "selector": ["td.green:contains('UP')"], - "filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"] + "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():0"] + "filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"] }, "ratio": { "selector": "td.yellow:contains('Ratio')", diff --git a/resource/sites/hd-torrents.org/config.json b/resource/sites/hd-torrents.org/config.json index eb6543ba2..b5529d5fa 100644 --- a/resource/sites/hd-torrents.org/config.json +++ b/resource/sites/hd-torrents.org/config.json @@ -103,15 +103,15 @@ }, "uploaded": { "selector": ["td.header:contains('Uploaded') + td"], - "filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"] + "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():0"] + "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]:0"] + "filters": ["query.text().replace(/,/g,'').match(/([\\d.]+)/)", "(query && query.length>=2)?query[1]:null"] }, "levelName": { "selector": "td.header:contains('Rank') + td" diff --git a/resource/sites/hdbits.org/config.json b/resource/sites/hdbits.org/config.json index c18ee5070..3d3807f84 100644 --- a/resource/sites/hdbits.org/config.json +++ b/resource/sites/hdbits.org/config.json @@ -147,11 +147,11 @@ "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():0"] + "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():0"] + "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", diff --git a/resource/sites/hdchina.org/config.json b/resource/sites/hdchina.org/config.json index 986637407..8280584a4 100644 --- a/resource/sites/hdchina.org/config.json +++ b/resource/sites/hdchina.org/config.json @@ -276,7 +276,7 @@ "fields": { "seeding": { "selector": ["div#ka1"], - "filters": ["query.parent().text().match(/\\(([\\d.]+)个种子/)", "(query && query.length>=2)?query[1]:0"] + "filters": ["query.parent().text().match(/\\(([\\d.]+)个种子/)", "(query && query.length>=2)?query[1]:null"] }, "seedingSize": { "selector": ["div#ka1"], diff --git a/resource/sites/hdcity.city/config.json b/resource/sites/hdcity.city/config.json index f0ac53ec1..860e603f2 100644 --- a/resource/sites/hdcity.city/config.json +++ b/resource/sites/hdcity.city/config.json @@ -162,11 +162,11 @@ "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():0"] + "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():0"] + "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/']", @@ -175,7 +175,7 @@ }, "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]):0"] + "filters": ["query.text().replace(/,/g,'').match(/(?:魅力值|Karma Points).+?([\\d.]+)/)", "(query && query.length>=2)?parseFloat(query[1]):null"] }, "messageCount": { "selector": ["li > a[href='messages']"], diff --git a/resource/sites/hdf.world/config.json b/resource/sites/hdf.world/config.json index f6e968a52..35d11a7a9 100644 --- a/resource/sites/hdf.world/config.json +++ b/resource/sites/hdf.world/config.json @@ -15,12 +15,7 @@ }], "securityKeyFields": ["authkey", "torrent_pass"], "searchEntryConfig": { - "skipIMDbId": true, - "page": "/ajax.php", - "resultType": "json", - "parseScriptFile": "getSearchResult.js", - "asyncParse": true, - "queryString": "action=browse&searchstr=$key$" + "skipIMDbId": true }, "searchEntry": [{ "name": "all", @@ -80,5 +75,8 @@ } } } + }, + "supportedFeatures": { + "imdbSearch": false } } \ No newline at end of file diff --git a/resource/sites/hdf.world/getSearchResult.js b/resource/sites/hdf.world/getSearchResult.js deleted file mode 100644 index 1ed74ceee..000000000 --- a/resource/sites/hdf.world/getSearchResult.js +++ /dev/null @@ -1,151 +0,0 @@ -(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 + - "]" + - " / " + - torrent.encoding + - " / " + - torrent.format + - " / " + - torrent.media + - (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); diff --git a/resource/sites/iptorrents.com/config.json b/resource/sites/iptorrents.com/config.json index 806bda2ae..cbe95a6e7 100644 --- a/resource/sites/iptorrents.com/config.json +++ b/resource/sites/iptorrents.com/config.json @@ -9,5 +9,95 @@ "host": "iptorrents.com", "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"] + } + } + } } } \ No newline at end of file diff --git a/resource/schemas/IPTorrents/details.js b/resource/sites/iptorrents.com/details.js similarity index 100% rename from resource/schemas/IPTorrents/details.js rename to resource/sites/iptorrents.com/details.js diff --git a/resource/schemas/IPTorrents/getSearchResult.js b/resource/sites/iptorrents.com/getSearchResult.js similarity index 100% rename from resource/schemas/IPTorrents/getSearchResult.js rename to resource/sites/iptorrents.com/getSearchResult.js diff --git a/resource/schemas/IPTorrents/torrents.js b/resource/sites/iptorrents.com/torrents.js similarity index 100% rename from resource/schemas/IPTorrents/torrents.js rename to resource/sites/iptorrents.com/torrents.js diff --git a/resource/sites/jpopsuki.eu/config.json b/resource/sites/jpopsuki.eu/config.json index d814ed722..07e6ea08b 100644 --- a/resource/sites/jpopsuki.eu/config.json +++ b/resource/sites/jpopsuki.eu/config.json @@ -68,19 +68,19 @@ "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():0"] + "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():0"] + "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]:0"] + "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]:0"] + "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('階級:')", diff --git a/resource/sites/jptvts.us/config.json b/resource/sites/jptvts.us/config.json index f6ff08c69..6e479e69e 100644 --- a/resource/sites/jptvts.us/config.json +++ b/resource/sites/jptvts.us/config.json @@ -4,32 +4,18 @@ "description": "JPTVTS", "icon": "https://jptvts.us/themes/default/images/favicon.ico", "url": "https://jptvts.us/", - "tags": [ - "日剧", - "综艺" - ], + "tags": ["日剧", "综艺"], "schema": "Common", "plugins": [ { "name": "种子详情页面", - "pages": [ - "/torrents-details.php" - ], - "scripts": [ - "/schemas/NexusPHP/common.js", - "/schemas/Common/details.js" - ] + "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" - ] + "pages": ["/torrents-today.php", "/torrents-search.php"], + "scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/torrents.js"] } ], "host": "jptvts.us", @@ -53,38 +39,23 @@ }, "fieldSelector": { "title": { - "selector": [ - "a" - ], - "filters": [ - "query.text()" - ] + "selector": ["a"], + "filters": ["query.text()"] }, "link": { - "selector": [ - "a" - ], - "filters": [ - "query.attr('href')", - "'https://jptvts.us/'+query" - ] + "selector": ["a"], + "filters": ["query.attr('href')", "'https://jptvts.us/'+query"] }, "url": { - "selector": [ - "" - ], + "selector": [""], "filters": [ "query.children().attr('href')", "'https://jptvts.us/'+query" ] }, "time": { - "selector": [ - "" - ], - "filters": [ - "'20'+query.text()" - ] + "selector": [""], + "filters": ["'20'+query.text()"] }, "progress": { "selector": [ @@ -93,15 +64,9 @@ "" ], "switchFilters": [ - [ - "query.length > 0 ? 100:null" - ], - [ - "query.length > 0 ? 0:null" - ], - [ - "null" - ] + ["query.length > 0 ? 100:null"], + ["query.length > 0 ? 0:null"], + ["null"] ] }, "status": { @@ -110,17 +75,7 @@ "td.ttable_seeding font[color='black']", "td.ttable_seeding font[color='#ff0000']" ], - "switchFilters": [ - [ - "2" - ], - [ - "255" - ], - [ - "1" - ] - ] + "switchFilters": [["2"], ["255"], ["1"]] } } }, @@ -144,55 +99,37 @@ "selector": "#main > table .myBlock-caption:first" }, "isLogged": { - "selector": [ - "a[href*='account-logout.php']" - ], - "filters": [ - "query.length>0" - ] + "selector": ["a[href*='account-logout.php']"], + "filters": ["query.length>0"] }, "messageCount": { - "selector": [ - "a[href*='/forum/private.php']" - ], + "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" - ], + "selector": [".myBlock-content td:contains('Uploaded:') + td"], "filters": [ "query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", - "(query && query.length>=2)?(query[1]).sizeToNumber():0" + "(query && query.length>=2)?(query[1]).sizeToNumber():null" ] }, "downloaded": { - "selector": [ - ".myBlock-content td:contains('Downloaded:') + td" - ], + "selector": [".myBlock-content td:contains('Downloaded:') + td"], "filters": [ "query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", - "(query && query.length>=2)?(query[1]).sizeToNumber():0" + "(query && query.length>=2)?(query[1]).sizeToNumber():null" ] }, "ratio": { - "selector": [ - ".myBlock-content td:contains('Ratio:') + td" - ], - "filters": [ - "query.text()" - ] + "selector": [".myBlock-content td:contains('Ratio:') + td"], + "filters": ["query.text()"] }, "levelName": { - "selector": [ - ".myBlock-content td:contains('Class:') + td" - ], - "filters": [ - "query.text()" - ] + "selector": [".myBlock-content td:contains('Class:') + td"], + "filters": ["query.text()"] }, "bonus": { "value": "N/A" @@ -203,20 +140,14 @@ "page": "/account.php", "fields": { "joinTime": { - "selector": [ - "td.prof-lbl:contains('Joined:') + td" - ], - "filters": [ - "dateTime(query.text()).valueOf()" - ] + "selector": ["td.prof-lbl:contains('Joined:') + td"], + "filters": ["dateTime(query.text()).valueOf()"] }, "seeding": { - "selector": [ - "b:contains('Currently seeding')" - ], + "selector": ["b:contains('Currently seeding')"], "filters": [ "query.text().match(/(\\d+)/)", - "(query && query.length>=2)?parseInt(query[1]):0" + "(query && query.length>=2)?parseInt(query[1]):null" ] }, "seedingSize": { @@ -234,45 +165,27 @@ "page": "/torrents-details.php", "fields": { "downloadURL": { - "selector": [ - "a[href*='download.php?id=']" - ], - "filters": [ - "query.attr('href')" - ] + "selector": ["a[href*='download.php?id=']"], + "filters": ["query.attr('href')"] }, "size": { - "selector": [ - "td[align='left']:contains('Total Size:') + td" - ], + "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" - ] + "selector": ["#ty-button"], + "filters": ["query"] }, "downloadURLs": { - "selector": [ - "a[href*='download.php?id=']" - ], - "filters": [ - "query.toArray()" - ] + "selector": ["a[href*='download.php?id=']"], + "filters": ["query.toArray()"] }, "confirmSize": { - "selector": [ - "table.ttable_headinner" - ], - "filters": [ - "query.find('td.ttable_size')" - ] + "selector": ["table.ttable_headinner"], + "filters": ["query.find('td.ttable_size')"] } } } diff --git a/resource/sites/oppaiti.me/config.json b/resource/sites/oppaiti.me/config.json deleted file mode 100644 index 47543d32f..000000000 --- a/resource/sites/oppaiti.me/config.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "Oppaitime", - "timezoneOffset": "+0000", - "description": "成人动漫站", - "icon": "https://oppaiti.me/favicon.ico", - "schema": "GazelleJSONAPI", - "tags": ["动画", "漫画", "游戏", "影视"], - "url": "https://oppaiti.me/", - "host": "oppaiti.me", - "collaborator": "bimzcy", - "searchEntryConfig": { - "skipIMDbId": true - }, - "searchEntry": [{ - "name": "all", - "enabled": true - }, - { - "queryString": "filter_cat[1]=1", - "name": "Movies", - "enabled": false - }, - { - "queryString": "filter_cat[2]=1", - "name": "Anime", - "enabled": false - }, - { - "queryString": "filter_cat[3]=1", - "name": "Manga", - "enabled": true - }, - { - "queryString": "filter_cat[4]=1", - "name": "Games", - "enabled": true - }, - { - "queryString": "filter_cat[5]=1", - "name": "Audio", - "enabled": false - }, - { - "queryString": "filter_cat[6]=1", - "name": "Other", - "enabled": false - } - ], - "selectors": { - "userSeedingTorrents": { - "page": "/user.php?id=$user.id$", - "fields": { - "seedingSize": { - "selector": ["li:contains('Total Seeding: ') > span"], - "filters": ["query.text().replace(/,/g,'').sizeToNumber()"] - }, - "bonus": { - "selector": ["span.stat > a[href]"], - "filters": ["query.text().replace(',', '')"] - } - } - } - }, - "supportedFeatures": { - "imdbSearch": false - } -} \ No newline at end of file diff --git a/resource/sites/orpheus.network/config.json b/resource/sites/orpheus.network/config.json index 3cfef8407..6cf0bbf48 100644 --- a/resource/sites/orpheus.network/config.json +++ b/resource/sites/orpheus.network/config.json @@ -15,10 +15,6 @@ "userSeedingTorrents": { "page": "/bonus.php?action=bprates", "fields": { - "seeding": { - "selector": ["div#content > table > tbody > tr > td:eq(0)"], - "filters": ["parseInt(query.text())"] - }, "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"] @@ -28,15 +24,6 @@ "filters": ["query.text().replace(/,/g,'')"] } } - }, - "userExtendInfo": { - "page": "/user.php?id=$user.id$", - "fields": { - "joinTime": { - "selector": ["div:contains('Statistics') + ul.stats > li:contains('Joined:') > span"], - "filters": ["query.attr('title')||query.text()", "dateTime(query).isValid()?dateTime(query).valueOf():query"] - } - } } }, "supportedFeatures": { diff --git a/resource/sites/passthepopcorn.me/config.json b/resource/sites/passthepopcorn.me/config.json index e7b132bb5..ea8d80c03 100644 --- a/resource/sites/passthepopcorn.me/config.json +++ b/resource/sites/passthepopcorn.me/config.json @@ -59,11 +59,11 @@ }, "ratio": { "selector": "ul.list > li:contains('Ratio:')", - "filters": ["query.text().replace(/,|\\n|\\s+/g,'').match(/Ratio.+?([\\d.]+)/)", "(query && query.length>=2)?query[1]:0"] + "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]):0"] + "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:')", diff --git a/resource/sites/pornbits.net/config.json b/resource/sites/pornbits.net/config.json index 2c3679248..e6e0e0f0c 100644 --- a/resource/sites/pornbits.net/config.json +++ b/resource/sites/pornbits.net/config.json @@ -17,17 +17,21 @@ "userBaseInfo": { "page": "/", "fields": { + "isLogged": { + "selector": ["a[href='/logout']"], + "filters": ["query.length>0"] + }, "name": { "selector": ["#subnav > div > div > ul > li.dropdown.pull-right > a > span.hidden-sm"], "filters": ["query.text()"] }, "uploaded": { - "selector": ["#header > div > div > div > span.navbar-text.stats.hidden-sm"], - "filters": ["query.text().split(':')[1].split('D')[0].trim()", "query.replace(/,/g,'').sizeToNumber()"] + "selector": ["abbr.upload"], + "filters": ["query.next().text().trim()", "query.length > 0?query.replace(/,/g,'').sizeToNumber():null"] }, "downloaded": { - "selector": ["#header > div > div > div > span.navbar-text.stats.hidden-sm"], - "filters": ["query.text().split(':')[2].split('R')[0].replace(/Bytes/g,'').trim()", "query.replace(/,/g,'').sizeToNumber()"] + "selector": ["abbr.download"], + "filters": ["if(query[0])$(query[0].nextSibling).text().trim().replace(/,/g,'').sizeToNumber()"] } } }, @@ -44,7 +48,7 @@ }, "seeding": { "selector": ["#content > div > div.col-md-9 > div:nth-child(5) > div.panel-heading > h4"], - "filters": ["query.text().split(':')[1].split('L')[0].trim()"] + "filters": ["if(query[0]&&query.text().split(':')[1])query.text().split(':')[1].split('L')[0].trim()"] }, "seedingSize": { "value": -1 diff --git a/resource/sites/pt.keepfrds.com/config.json b/resource/sites/pt.keepfrds.com/config.json index 85a5eeecd..f9ce98695 100644 --- a/resource/sites/pt.keepfrds.com/config.json +++ b/resource/sites/pt.keepfrds.com/config.json @@ -161,5 +161,9 @@ "torrentTagSelectors": [{ "name": "⛔️", "selector": "td.embedded b > font.recommended:contains('禁转')" + },{ + "name": "Neutral", + "selector": "img.pro_nl", + "color": "purple" }] } \ No newline at end of file diff --git a/resource/sites/redacted.ch/config.json b/resource/sites/redacted.ch/config.json index fe4fa6056..d61a9ab3f 100644 --- a/resource/sites/redacted.ch/config.json +++ b/resource/sites/redacted.ch/config.json @@ -53,14 +53,16 @@ ], "selectors": { "userSeedingTorrents": { - "merge": true, "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" + } } } }, diff --git a/resource/sites/sdbits.org/config.json b/resource/sites/sdbits.org/config.json index 42d19717c..222ed955c 100644 --- a/resource/sites/sdbits.org/config.json +++ b/resource/sites/sdbits.org/config.json @@ -133,11 +133,11 @@ "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():0"] + "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():0"] + "filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"] }, "ratio": { "selector": "font:contains('Ratio') +", diff --git a/resource/sites/speedapp.io/config.json b/resource/sites/speedapp.io/config.json index d76b75e1b..f048e4521 100644 --- a/resource/sites/speedapp.io/config.json +++ b/resource/sites/speedapp.io/config.json @@ -105,11 +105,11 @@ }, "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():0"] + "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():0"] + "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"], @@ -139,7 +139,7 @@ }, "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]):0"] + "filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):null"] } } }, diff --git a/resource/sites/sportscult.org/config.json b/resource/sites/sportscult.org/config.json index 6e6402e0f..569f45d44 100644 --- a/resource/sites/sportscult.org/config.json +++ b/resource/sites/sportscult.org/config.json @@ -4,449 +4,410 @@ "description": "sportscult", "url": "https://sportscult.org/", "icon": "https://sportscult.org/favicon.ico", - "tags": [ - "体育" - ], + "tags": ["体育"], "schema": "Common", "collaborator": "枕头啊枕头", "plugins": [ - { - "name": "种子详情页面", - "pages": [ - "/index.php" - ], - "scripts": [ - "/schemas/NexusPHP/common.js", - "details.js" - ] - } + { + "name": "种子详情页面", + "pages": ["/index.php"], + "scripts": ["/schemas/NexusPHP/common.js", "details.js"] + } ], "host": "sportscult.org", "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" - ] - } + "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 - } + { + "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']" - } + { + "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():0" - ] - }, - "downloaded": { - "selector": "td.header:contains('Downloaded:') + td", - "filters": [ - "(query && query.length > 0) ? query.text().sizeToNumber():0" - ] - }, - "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": { - "value": "N/A" - }, - "seedingSize": { - "value": -1 - }, - "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()" - ] - } - } - }, - "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" - ] - } - } + "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": { + "value": "N/A" + }, + "seedingSize": { + "value": -1 + }, + "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()" + ] + } + } + }, + "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 + "imdbSearch": false } -} \ No newline at end of file +} diff --git a/resource/sites/teamhd.org/config.json b/resource/sites/teamhd.org/config.json index 6879da004..0b4c7f9b1 100644 --- a/resource/sites/teamhd.org/config.json +++ b/resource/sites/teamhd.org/config.json @@ -100,11 +100,11 @@ }, "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():0"] + "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():0"] + "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']"], diff --git a/resource/sites/u2.dmhy.org/config.json b/resource/sites/u2.dmhy.org/config.json index 10a83886d..481558eb6 100644 --- a/resource/sites/u2.dmhy.org/config.json +++ b/resource/sites/u2.dmhy.org/config.json @@ -206,7 +206,7 @@ "fields": { "bonus": { "selector": ["td.rowhead:contains('UCoin') + td"], - "filters": ["query.text().replace(/,/g,'').match(/\\(([\\d.]+)/)", "(query && query.length>=2)?parseFloat(query[1]):0"] + "filters": ["query.text().replace(/,/g,'').match(/\\(([\\d.]+)/)", "(query && query.length>=2)?parseFloat(query[1]):null"] } } }, diff --git a/resource/sites/www.cinematik.net/config.json b/resource/sites/www.cinematik.net/config.json index 2666127e0..426297646 100644 --- a/resource/sites/www.cinematik.net/config.json +++ b/resource/sites/www.cinematik.net/config.json @@ -60,11 +60,11 @@ }, "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():0"] + "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():0"] + "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" diff --git a/resource/sites/www.empornium.is/config.json b/resource/sites/www.empornium.is/config.json index b79df99ac..c9589fd43 100644 --- a/resource/sites/www.empornium.is/config.json +++ b/resource/sites/www.empornium.is/config.json @@ -100,15 +100,15 @@ }, "seeding": { "selector": ["#nav_seeding_r"], - "filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"] + "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():0"] + "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():0"] + "filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"] }, "ratio": { "selector": ["td:contains('Ratio:') + td"], diff --git a/resource/sites/www.morethantv.me/config.json b/resource/sites/www.morethantv.me/config.json index 0da093c2c..2ab65a9ed 100644 --- a/resource/sites/www.morethantv.me/config.json +++ b/resource/sites/www.morethantv.me/config.json @@ -3,7 +3,7 @@ "timezoneOffset": "+0000", "description": "", "icon": "https://www.morethantv.me/favicon.ico", - "schema": "Luminance", + "schema": "Common", "tags": ["电视剧", "剧集"], "url": "https://www.morethantv.me", "collaborator": "luckiestone", @@ -11,10 +11,15 @@ "formerHosts": [ "www.morethan.tv" ], - "supportedFeatures": { - "search": false, - "imdbSearch": false - }, + "plugins": [{ + "name": "种子详情页面", + "pages": ["/torrents.php"], + "scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/details.js"] + }, { + "name": "种子列表", + "pages": ["/torrents/browse", "/show/(\\d+)/$","/collages.php"], + "scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/torrents.js"] + }], "selectors": { "userBaseInfo": { "merge": true, @@ -43,19 +48,19 @@ "fields": { "uploaded": { "selector": "ul.stats > li:contains('Uploaded')", - "filters": ["query.text().replace(/,/g,'').match(/Uploaded.+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"] + "filters": ["query.text().replace(/,/g,'').match(/Uploaded.+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"] }, "downloaded": { "selector": "ul.stats > li:contains('Downloaded')", - "filters": ["query.text().replace(/,/g,'').match(/Downloaded.+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"] + "filters": ["query.text().replace(/,/g,'').match(/Downloaded.+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"] }, "ratio": { "selector": "ul.stats > li:contains('Ratio:')", - "filters": ["query.text().replace(/,/g,'').match(/Ratio.+?([\\d.]+)/)", "(query && query.length>=2)?query[1]:0"] + "filters": ["query.text().replace(/,/g,'').match(/Ratio.+?([\\d.]+)/)", "(query && query.length>=2)?query[1]:null"] }, "seeding": { "selector": ["ul.stats > li:contains('Seeding:')"], - "filters": [ "query.text().replace(/,/g, '').match(/Seeding:.+?([\\d]+)/)", "(query && query.length>=2)?query[1]:0" ] + "filters": [ "query.text().replace(/,/g, '').match(/Seeding:.+?([\\d]+)/)", "(query && query.length>=2)?query[1]:null" ] }, "seedingSize": { "selector": ["ul.stats > li:contains('Seeding Size:')"], @@ -74,6 +79,27 @@ "filters": ["query.attr('title')||query.text()", "dateTime(query).isValid()?dateTime(query).valueOf():query"] } } + }, + "common": { + "page": "/torrents.php", + "fields": { + "downloadURL": { + "selector": ["tr[id*='torrentinfo'][class!='hidden']"], + "filters": ["query.prev().find(\"a[href*='action=download']\").attr('href')"] + }, + "size": { + "selector": ["tr.group_torrent > td.nobr"], + "filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"] + }, + "downloadURLs": { + "selector": ["a[href*='action=download']"], + "filters": ["query.toArray()"] + }, + "confirmSize": { + "selector": ["tr.group_torrent > td.nobr"], + "filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"] + } + } } } } \ No newline at end of file diff --git a/resource/sites/www.myanonamouse.net/config.json b/resource/sites/www.myanonamouse.net/config.json index da620c86a..59c7b73bd 100644 --- a/resource/sites/www.myanonamouse.net/config.json +++ b/resource/sites/www.myanonamouse.net/config.json @@ -3,10 +3,7 @@ "description": "Friendliness, Warmth and Sharing", "url": "https://www.myanonamouse.net/", "icon": "https://cdn.myanonamouse.net/favicon.ico", - "tags": [ - "电子书", - "有声书" - ], + "tags": ["电子书", "有声书"], "schema": "MyAnonaMouse", "host": "www.myanonamouse.net", "collaborator": "tongyifan", @@ -19,23 +16,13 @@ "plugins": [ { "name": "种子详情页面", - "pages": [ - "/t/\\d+" - ], - "scripts": [ - "/schemas/NexusPHP/common.js", - "details.js" - ] + "pages": ["/t/\\d+"], + "scripts": ["/schemas/NexusPHP/common.js", "details.js"] }, { "name": "种子列表", - "pages": [ - "/tor/browse.php", - "/stats/top10Tor.php" - ], - "styles": [ - "/libs/album/style.css" - ], + "pages": ["/tor/browse.php", "/stats/top10Tor.php"], + "styles": ["/libs/album/style.css"], "scripts": [ "/schemas/NexusPHP/common.js", "/libs/album/album.js", @@ -73,34 +60,20 @@ "page": "/index.php", "fields": { "id": { - "selector": [ - "li.myInfo > a" - ], + "selector": ["li.myInfo > a"], "attribute": "href", - "filters": [ - "query ? query.match(/(\\d+)/)[1]:''" - ] + "filters": ["query ? query.match(/(\\d+)/)[1]:''"] }, "name": { - "selector": [ - "a#userMenu" - ], - "filters": [ - "query ? query.text().replace(\"↓\", \"\").trim() : ''" - ] + "selector": ["a#userMenu"], + "filters": ["query ? query.text().replace(\"↓\", \"\").trim() : ''"] }, "isLogged": { - "selector": [ - "a[href='/preferences/index.php']" - ], - "filters": [ - "query.length>0" - ] + "selector": ["a[href='/preferences/index.php']"], + "filters": ["query.length>0"] }, "messageCount": { - "selector": [ - "a.tmnb, a.tmn, a.tmng" - ], + "selector": ["a.tmnb, a.tmn, a.tmng"], "filters": [ "query.text().match(/(\\d+)/g)", "query ? query.map(Number).reduce((sum, current) => {return sum + current;}, 0) : 0" @@ -112,44 +85,32 @@ "page": "/u/$user.id$", "fields": { "uploaded": { - "selector": [ - "td.rowhead:contains('Uploaded'):eq(0) + td" - ], + "selector": ["td.rowhead:contains('Uploaded'):eq(0) + td"], "filters": [ "query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", - "(query && query.length==2)?(query[1]).sizeToNumber():0" + "(query && query.length==2)?(query[1]).sizeToNumber():null" ] }, "downloaded": { - "selector": [ - "td.rowhead:contains('Downloaded'):eq(0) + td" - ], + "selector": ["td.rowhead:contains('Downloaded'):eq(0) + td"], "filters": [ "query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", - "(query && query.length==2)?(query[1]).sizeToNumber():0" + "(query && query.length==2)?(query[1]).sizeToNumber():null" ] }, "levelName": { - "selector": [ - "td.rowhead:contains('Class') + td" - ], - "filters": [ - "query.text()" - ] + "selector": ["td.rowhead:contains('Class') + td"], + "filters": ["query.text()"] }, "bonus": { - "selector": [ - "a#tmBP" - ], + "selector": ["a#tmBP"], "filters": [ "query.text().replace(/,/g,'').match(/Bonus: ([\\d.]+)/)", - "(query && query.length==2)?parseFloat(query[1]):0" + "(query && query.length==2)?parseFloat(query[1]):null" ] }, "joinTime": { - "selector": [ - "td.rowhead:contains('Join'):contains('date') + td" - ], + "selector": ["td.rowhead:contains('Join'):contains('date') + td"], "filters": [ "query.text().split(' (')[0]", "dateTime(query).isValid()?dateTime(query).valueOf():query" @@ -164,46 +125,28 @@ "common": { "fields": { "downloadURLs": { - "selector": [ - "a[href*='/tor/download.php/']" - ], - "filters": [ - "query.toArray()" - ] + "selector": ["a[href*='/tor/download.php/']"], + "filters": ["query.toArray()"] }, "confirmSize": { - "selector": [ - "table.newTorTable > tbody > tr > td:eq(4)" - ], - "filters": [ - "query" - ] + "selector": ["table.newTorTable > tbody > tr > td:eq(4)"], + "filters": ["query"] }, "downloadURL": { - "selector": [ - "a#tddl" - ], + "selector": ["a#tddl"], "attribute": "href", - "filters": [ - "query" - ] + "filters": ["query"] }, "size": { - "selector": [ - "div#size > div:eq(1) > span" - ], + "selector": ["div#size > div:eq(1) > span"], "filters": [ "query.text().replace(/[, ]/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0" ] }, "sayThanksButton": { - "selector": [ - "button#giveThanks" - ], - "filters": [ - "query" - ] + "selector": ["button#giveThanks"], + "filters": ["query"] } } } diff --git a/resource/sites/www.pttime.org/config.json b/resource/sites/www.pttime.org/config.json index 2b13f9e40..1673c5ed0 100644 --- a/resource/sites/www.pttime.org/config.json +++ b/resource/sites/www.pttime.org/config.json @@ -39,11 +39,11 @@ "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"] + "filters": ["query.text().replace(/,/g,'').match(/(上[传傳]量|Uploaded).+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length==3)?(query[2]).sizeToNumber():null"] }, "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"] + "filters": ["query.text().replace(/,/g,'').match(/(下[载載]量|Downloaded).+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length==3)?(query[2]).sizeToNumber():null"] }, "levelName": { "selector": ["td.rowhead:contains('等级')", "td.rowhead:contains('等級')", "td.rowhead:contains('Class')"], diff --git a/resource/sites/www.torrentday.com/config.json b/resource/sites/www.torrentday.com/config.json index 10ca29e59..104578b14 100644 --- a/resource/sites/www.torrentday.com/config.json +++ b/resource/sites/www.torrentday.com/config.json @@ -21,11 +21,11 @@ "fields": { "uploaded": { "selector": ["span.detailsInfoSpan:contains('Up: ') > span"], - "filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"] + "filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"] }, "downloaded": { "selector": ["span.detailsInfoSpan:contains('Down: ') > span"], - "filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"] + "filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"] }, "ratio": { "selector": "span.detailsInfoSpan:contains('Ratio: ') > span", diff --git a/resource/sites/www.torrentleech.org/config.json b/resource/sites/www.torrentleech.org/config.json index 9b577fb0a..73681ca20 100644 --- a/resource/sites/www.torrentleech.org/config.json +++ b/resource/sites/www.torrentleech.org/config.json @@ -42,19 +42,19 @@ }, "uploaded": { "selector": ["span.centerTopBar div[title^='Uploaded'] span"], - "filters": ["query.text().trim().replace(/,/g,'').sizeToNumber()"] + "filters": ["query.text()?query.text().trim().replace(/,/g,'').sizeToNumber():null"] }, "downloaded": { "selector": ["span.centerTopBar div[title^='Downloaded'] span"], - "filters": ["query.text().trim().replace(/,/g,'').sizeToNumber()"] + "filters": ["query.text()?query.text().trim().replace(/,/g,'').sizeToNumber():null"] }, "bonus": { "selector": ["span.centerTopBar span.total-TL-points"], "filters": ["query.text().replace(/,/g,'')"] }, "messageCount": { - "selector": ["a[href='/content/articles'] i.news-notify"], - "filters": ["query.length>0 ? 255: 0"] + "selector": ["span.link[onclick*='/notifications']"], + "filters": ["parseInt(query.text().trim())"] } } },