Skip to content

Commit

Permalink
fix #978: updated broken regex to JS style - the real fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
MewX committed Mar 1, 2022
1 parent 9d3f428 commit 50dd124
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions resource/sites/www.skyey2.com/config.json
Expand Up @@ -33,28 +33,24 @@
"page": "/home.php?mod=space&uid=$user.id$",
"fields": {
"uploaded": {
"selector": [
"#psts li:contains('上传量')"
],
"selector": "#psts li:contains('上传量')",
"filters": [
"query.text().match('上传量.*?/\\s*([\\d\\.]+\\s*?[ZEPTGMK]?i?B)')",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
"query.text().match(/上传量.+?\\/\\s*([\\d\\.]+\\s*?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2) ? query[1].sizeToNumber() : 0"
]
},
"downloaded": {
"selector": [
"#psts li:contains('下载量')"
],
"selector": "#psts li:contains('下载量')",
"filters": [
"query.text().match('下载量.*?/\\s*([\\d\\.]+\\s*?[ZEPTGMK]?i?B)')",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
"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"
"query.text().match(/分享率\\s+?([\\d\\.]+)/)",
"(query && query.length>=2) ? query[1].trim() : 0"
]
},
"seeding": {
Expand All @@ -67,8 +63,8 @@
"seedingSize": {
"selector": "#psts li:contains('实际保种')",
"filters": [
"query.text().match('实际保种.*?/\\s*([\\d\\.]+\\s*[ZEPTGMK])')",
"(query && query.length>=2)?(query[1].trim()).sizeToNumber():0"
"query.text().match(/实际保种.+?\\/\\s*([\\d\\.]+\\s*[ZEPTGMK])/)",
"(query && query.length>=2) ? (query[1].trim()).sizeToNumber() : 0"
]
},
"levelName": {
Expand Down

0 comments on commit 50dd124

Please sign in to comment.