Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #41

Merged
merged 9 commits into from
Oct 27, 2022
Merged

Dev #41

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
962 changes: 481 additions & 481 deletions resource/schemas/NexusPHP/getSearchResult.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions resource/sites/asiancinema.me/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"resultType": "html",
"parseScriptFile": "/sites/asiancinema.me/getSearchResult.js",
"resultSelector": "div.table-responsive > table:first",
"queryString": "search=$key$",
"queryString": "search=$key$&qty=100",
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"queryString": "imdb=$key$",
"queryString": "imdb=$key$&qty=100",
"replaceKey": [
"tt", ""
]
Expand Down
30 changes: 8 additions & 22 deletions resource/sites/club.hares.top/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"div[title^='leeching'], div[title^='seeding'], div[title^='inactivity']"
],
"filters": [
"query ? query.attr('title').replace('leeching','').replace('seeding','').replace('inactivity','').replace('%','').trim() : null"
"query[0] ? query.attr('title').replace('leeching','').replace('seeding','').replace('inactivity','').replace('%','').trim() : null"
]
},
"status": {
Expand Down Expand Up @@ -172,34 +172,20 @@
"selector": [
".layui-row.layui-userdetails.layui-poll-con.layui-margin-bottom table tbody td:eq(10)"
],
"filters": ["query.text()"]
"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"
]
"filters": [ "query.html()" ]
},
"seeding": {
"selector": "",
"filters": [
"query.text().match(/(.*?)条记录/g)",
"(query && query.length>0 ) ? query[0].replace('条记录', '').trim() : 0",
"(query != 0) ? query : 0"
]
"selector": [ "i.fas.fa-upload.text-success.fa-fw + span.list-info" ],
"filters": ["query.text().trim()"]
},
"seedingSize": {
"value": -1
}
}
}
Expand Down
37 changes: 27 additions & 10 deletions resource/sites/pt.btschool.club/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,43 @@
"description": "汇聚每一个人的影响力",
"url": "https://pt.btschool.club/",
"icon": "https://pt.btschool.club/favicon.ico",
"tags": ["影视", "综合"],
"tags": [ "影视", "综合" ],
"schema": "NexusPHP",
"host": "pt.btschool.club",
"formerHosts": [
"pt.btschool.net"
],
"searchEntryConfig": {
"area": [{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"appendQueryString": "&search_area=1"
}],
"area": [
{
"name": "IMDB",
"keyAutoMatch": "^(tt\\d+)$",
"appendQueryString": "&search_area=1"
}
],
"fieldSelector": {
"progress": {
"selector": [".progress:eq(0) > div"],
"filters": ["query.attr('style')||''", "query.match(/width:([ \\d.]+)%/)", "(query && query.length>=2)?query[1]:null"]
"selector": [ ".progress:eq(0) > div" ],
"filters": [ "query.attr('style')||''", "query.match(/width:([ \\d.]+)%/)", "(query && query.length>=2)?query[1]:null" ]
},
"status": {
"selector": [".progress:eq(0) > div"],
"filters": ["query.attr('class')", "query=='progress_seeding'?2:(query=='progress_completed'?255:(query=='progress_no_downloading'?3:1))"]
"selector": [ ".progress:eq(0) > div" ],
"filters": [ "query.attr('class')", "query=='progress_seeding'?2:(query=='progress_completed'?255:(query=='progress_no_downloading'?3:1))" ]
}
}
},
"selectors": {
"userExtendInfo": {
"merge": true,
"fields": {
"seeding": {
"selector": [ "span.medium img.arrowup" ],
"filters": [ "$(query[0].nextSibling).text().trim().replace(/,/g,'')" ]
},
"seedingSize": {
"selector": [ "td.rowhead:contains('当前做种') + td", "td.rowhead:contains('目前做種') + td", "td.rowhead:contains('Current Seeding') + td" ],
"filters": [ "query.text().replace(/.*共计/g,'').replace(')','')", "query.sizeToNumber()" ]
}
}
}
}
Expand Down
7 changes: 3 additions & 4 deletions resource/sites/speedapp.io/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"time": {
"selector": [""],
"filters": ["query.attr('title')","dateTime(query).valueOf()?dateTime(query):query"]
"filters": [ "query.attr('title')", "dateTime(query).isValid() ? dateTime(query).valueOf() : dateTime(query.replace('下午','PM ').replace('上午','AM ').replace('日','').replaceAll(/年|月/g,'-'), 'YYYY-M-D A hh:mm:ss').format('YYYY-M-D HH:mm')" ]
},
"seeders": {
"selector": ["span:contains('seeders')"],
Expand Down Expand Up @@ -119,10 +119,9 @@
"selector": ["div.card-body.pt-4 >div.align-items-center div.text-muted"],
"filters": ["query.text().replace(/,|\\s|\\n/g,'')"]
},

"joinTime": {
"joinTime": {
"selector": ["dt:contains('注册日期') + dd, dt:contains('Signup date') + dd, dt:contains('Data inregistrarii') + dd"],
"filters": ["dateTime(query.text()).valueOf()"]
"filters": [ "query.text()", "dateTime(query).isValid() ? dateTime(query).valueOf() : dateTime(query.replace('下午','PM ').replace('上午','AM ').replace('日','').replaceAll(/年|月/g,'-'), 'YYYY-M-D A hh:mm:ss').valueOf()" ]
},
"seedingSize": {
"selector": ["dt:contains('奖励积分') + dd > b:nth-of-type(2)","dt:contains('Bonus points') + dd > b:nth-of-type(2)","dt:contains('Puncte bonus') + dd > b:nth-of-type(2)"],
Expand Down
Loading