Skip to content

Commit

Permalink
fix #978: SkyeySnow user info fetching.
Browse files Browse the repository at this point in the history
  • Loading branch information
MewX committed Feb 23, 2022
1 parent f692132 commit 87abc58
Showing 1 changed file with 49 additions and 16 deletions.
65 changes: 49 additions & 16 deletions resource/sites/www.skyey2.com/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"description": "天雪",
"icon": "https://www.skyey2.com/favicon.ico",
"tags": ["动漫"],
"collaborator": [
"栽培者",
"MewX"
],
"host": "www.skyey2.com",
"selectors": {
"userBaseInfo": {
Expand All @@ -29,38 +33,67 @@
"page": "/home.php?mod=space&uid=$user.id$",
"fields": {
"uploaded": {
"selector": ["#psts li:contains('上传量')"],
"filters": ["query.text().replace(/,/g,'').match(/上传量+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
"selector": [
"#psts li:contains('上传量')"
],
"filters": [
"query.text().match('上传量.*?/\\s*([\\d\\.]+\\s*?[ZEPTGMK]?i?B)')",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
]
},
"downloaded": {
"selector": ["#psts li:contains('下载量')"],
"filters": ["query.text().replace(/,/g,'').match(/下载量+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
"selector": [
"#psts li:contains('下载量')"
],
"filters": [
"query.text().match('下载量.*?/\\s*([\\d\\.]+\\s*?[ZEPTGMK]?i?B)')",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
]
},
"ratio": {
"selector": "ul.bbda",
"filters": [
"query.text().match('分享率\\s+?([\\d\\.]+)')",
"(query && query.length>=2)?(query[1].trim()):0"
]
},
"seeding": {
"selector": "#psts li:contains('做种数估计')",
"filters": [
"query.text().replace('做种数估计', '').replace(/,/g,'').trim()",
"parseFloat(query)"
]
},
"seedingSize": {
"selector": "#psts li:contains('实际保种')",
"filters": [
"query.text().match('实际保种.*?/\\s*([\\d\\.]+\\s*[ZEPTGMK])')",
"(query && query.length>=2)?(query[1].trim()).sizeToNumber():0"
]
},
"levelName": {
"selector": "a[href='home.php?mod=spacecp&ac=usergroup']",
"filters": ["query.text().replace('用户组: ', '').trim()"]
},
"bonus": {
"selector": ["#ratio"],
"filters": ["query.text().replace('论坛积分:', '').replace(/,/g,'').trim()", "parseFloat(query)"]
"filters": [
"query.text().replace('积分: ', '').replace(/,/g,'').trim()",
"parseFloat(query)"
]
},
"joinTime": {
"selector": "#pbbs > li:contains('注册时间')",
"filters": ["query.text().replace('注册时间', '').trim()", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
},
"seeding": {
"selector": ["#psts li:contains('即时保种数')"],
"filters": ["query.text().replace('即时保种数', '').replace(/,/g,'').trim()", "parseFloat(query)"]
},
"seedingSize": {
"value": -1
"filters": [
"query.text().replace('注册时间', '').trim()",
"dateTime(query).isValid()?dateTime(query).valueOf():query"
]
}
}
}
},
"supportedFeatures": {
"imdbSearch": false,
"userData": ""
"imdbSearch": false
},
"searchEntryConfig": {
"fieldSelector": {
Expand All @@ -74,4 +107,4 @@
}
}
}
}
}

0 comments on commit 87abc58

Please sign in to comment.