Skip to content

Commit

Permalink
适配 bitbr.cc 正确获取个人数据
Browse files Browse the repository at this point in the history
  • Loading branch information
SHL-COOL committed Mar 10, 2022
1 parent 5377cc4 commit ec1b1c7
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions resource/sites/bitbr/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"name": "bitbr",
"timezoneOffset": "+0800",
"schema": "NexusPHP",
"url": "https://bitbr.cc/",
"icon": "https://bitbr.cc/favicon.ico",
"tags": [
"影视",
"成人"
],
"host": "bitbr.cc",
"collaborator": "枕头啊枕头",
"selectors": {
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"merge": true,
"fields": {
"uploaded": {
"selector": "span.medium",
"filters": [
"query.text().match(/Uploaded: (.*?) Downloaded/g)[0].replace('Uploaded:', '').replace('Downloaded', '').trim()",
"(query && query.length>=2) ? query.sizeToNumber() : 0"
]
},
"downloaded": {
"selector": "span.medium",
"filters": [
"query.text().match(/Downloaded: (.*?) Torrents/g)[0].replace('Downloaded:', '').replace('Torrents', '').trim()",
"(query && query.length>=2) ? query.sizeToNumber() : 0"
]
},
"ratio": {
"selector": "span.medium",
"filters": [
"query.text().match(/Ratio:(.*?) Uploaded:/g)[0].replace('Ratio:','').replace('Uploaded:','').replace(/,/gi,'').trim()",
"(query && query.length>=2) ? query : 0"
]
},
"levelName": {
"selector": "table.main tbody tbody td:contains(Classe)",
"filters": [
"query.parent().children('td').eq(1).find('img').attr('title')"
]
},
"bonus": {
"selector": [
"table.main tbody tbody td:contains(Pontos Karma)"
],
"filters": [
"query.parent().children('td').eq(1).text()",
"parseFloat(query)"
]
},
"joinTime": {
"selector": "table.main tbody tbody tr:eq(2) td:eq(1)",
"filters": [
"query.text().match(/\\d{4}-\\d{1,2}-\\d{1,2} \\d{2}:\\d{1,2}:\\d{1,2}/g)[0]",
"dateTime(query).isValid()?dateTime(query).valueOf():query"
]
}
}
},
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/registro(.*?)Tipo/g)",
"(query && query.length>0 ) ? query[0].replace('registro', '').replace('Tipo', '').replace('s', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
},
"seeding": {
"selector": "",
"filters": [
"query.text().match(/(.*?)registro/g)",
"(query && query.length>0 ) ? query[0].replace('registro', '').trim() : 0",
"(query != 0) ? query : 0"
]
}
}
}
}
}

0 comments on commit ec1b1c7

Please sign in to comment.