Skip to content

Commit

Permalink
Merge pull request #33 from ronggang/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Bright-W committed Aug 6, 2022
2 parents af84e34 + 66028c6 commit 2aece55
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 21 deletions.
2 changes: 1 addition & 1 deletion resource/schemas/NexusPHP/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"filters": ["query.next().find('img').attr('title')"]
},
"bonus": {
"selector": ["td.rowhead:contains('魔力') + td", "td.rowhead:contains('Karma'):contains('Points') + td", "td.rowhead:contains('麦粒') + td", "td.rowfollow:contains('魔力值')"],
"selector": ["td.rowhead:contains('魔力') + td", "td.rowhead:contains('Karma'):contains('Points') + td", "td.rowhead:contains('麦粒') + td", "td.rowfollow:contains('魔力值')", "td.rowhead:contains('bonus') + td"],
"filters": ["query.is(\":contains('魔力值:')\")?query.text().replace(/,/g,'').match(/魔力值.+?([\\d.]+)/)[1]:query.text().replace(/,/g,'')", "parseFloat(query)"]
},
"joinTime": {
Expand Down
20 changes: 19 additions & 1 deletion resource/sites/1ptba.com/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,23 @@
"影视",
"综合"
],
"host": "1ptba.com"
"host": "1ptba.com",
"selectors": {
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["b:first"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": "",
"filters": [
"/总大小:(.*?)类型/.exec(query.text())[1]",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}
34 changes: 20 additions & 14 deletions resource/sites/greatposterwall.com/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,31 @@
"enabled": true
}],
"selectors": {
"userSeedingTorrents": {
"page": "/bonus.php?action=bprates",
"userBaseInfo": {
"page": "/ajax.php?action=index",
"dataType": "json",
"merge": true,
"fields": {
"seedingSize": {
"selector": [
"#seeding-size-value"
],
"filters": [
"query.data('value')"
]
"selector": ["response.userstats.seedingSize"]
},
"bonus": {
"selector": [
"#bp-value"
],
"filters": [
"query.data('value')"
]
"selector": ["response.userstats.bonusPoints"]
},
"joinTime": {
"selector": ["response.userstats.joinedDate"]
},
"seeding": {
"selector": ["response.userstats.seedingCount"]
}
}
},
"userExtendInfo": {
"disabled": true
},
"userSeedingTorrents": {
"page": "/bonus.php?action=bprates",
"fields": {
"seedingList": {
"selector": ["a[href*='torrentid=']"],
"filters": ["jQuery.map(query, item=>$(item).attr('href').match(/torrentid=(\\d+)/)[1])"]
Expand Down
5 changes: 3 additions & 2 deletions resource/sites/hdbits.org/getSearchResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@
//配置
category: 0
};
if(options.page.find("div#codec1"))
fieldIndex = {time: 3,size: 4,seeders: 6,leechers: 7,completed: 5,name: 1,author: 8,category: 0};
if(rows.eq(0).find(">td").length == 9) {
fieldIndex = {time: 3,size: 4,seeders: 6,leechers: 7,completed: 5,name: 1,author: 8,category: 0};
}
if (site.url.substr(-1) == "/") {
site.url = site.url.substr(0, site.url.length - 1);
}
Expand Down
4 changes: 4 additions & 0 deletions resource/sites/hdtime.org/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["b:first"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": "",
"filters": [
Expand Down
14 changes: 11 additions & 3 deletions resource/sites/www.pttime.org/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,19 @@
}
},
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"page": "/getusertorrentlist.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["#outer > span:nth-child(3) > b"],
"filters": ["query.text()"]
},
"seedingSize": {
"selector": ["tr:not(:eq(0))"],
"filters": ["jQuery.map(query.find('td.rowfollow:eq(2)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
"selector": "",
"filters": [
"/资源总大小:(.*)/.exec(query.text())[1]",
"(query != 0) ? query.sizeToNumber() : 0"

]
}
}
},
Expand Down

0 comments on commit 2aece55

Please sign in to comment.