Skip to content

Commit

Permalink
fix: unit3d一些站点配置写入模板中
Browse files Browse the repository at this point in the history
由于改了match,不确定有没有什么潜在问题
  • Loading branch information
ted423 committed May 7, 2022
1 parent f030f7f commit 049b4ad
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 60 deletions.
18 changes: 9 additions & 9 deletions resource/schemas/UNIT3D/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,20 @@
]
},
"uploaded": {
"selector": ["div.ratio-bar i.fa-arrow-up"],
"filters": ["query.parent().text().trim().replace(/,/g,'').match(/:.+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
"selector": ["div.ratio-bar i.fa-arrow-up, ul.top-nav__ratio-bar i.fa-arrow-up, span[title='Upload'], span[title='上传']"],
"filters": ["query.parent().text().trim().replace(/,|\\s|\\n/g,'').match(/[\\d.]+ ?[ZEPTGMK]?i?B/)", "(query && query.length>=1)?(query[0]).sizeToNumber():0"]
},
"downloaded": {
"selector": ["div.ratio-bar i.fa-arrow-down"],
"filters": ["query.parent().text().trim().replace(/,/g,'').match(/:.+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
"selector": ["div.ratio-bar i.fa-arrow-down, ul.top-nav__ratio-bar i.fa-arrow-down, span[title='Download'], span[title='下载']"],
"filters": ["query.parent().text().trim().replace(/,|\\s|\\n/g,'').match(/[\\d.]+ ?[ZEPTGMK]?i?B/)", "(query && query.length>=1)?(query[0]).sizeToNumber():0"]
},
"bonus": {
"selector": ["div.ratio-bar i.fa-coins"],
"filters": ["query.parent().text().trim().replace(/,|\\s/g,'').match(/([\\d.]+)/)", "(query && query.length>=2)?parseFloat(query[1]):0"]
"selector": ["div.ratio-bar i.fa-coins, ul.top-nav__ratio-bar i.fa-coins, a[title='My Bonus Points'], a[title='我的魔力']"],
"filters": ["query.parent().text().trim().replace(/,|\\s|\\n/g,'').match(/[\\d.]+/)", "(query && query.length>=1)?parseFloat(query[0]):0"]
},
"seeding": {
"selector": ["div.ratio-bar i.fa-upload"],
"filters": ["query.parent().text().trim().replace(/,|\\n/g,'').match(/:.+?([\\d.]+)/)", "(query && query.length>=2)?parseFloat(query[1]):0"]
"selector": ["div.ratio-bar i.fa-upload, ul.top-nav__ratio-bar i.fa-upload, span[title='Seeding'], span[title='做种']"],
"filters": ["query.parent().text().trim().replace(/,|\\s|\\n/g,'').match(/[\\d.]+/)", "(query && query.length>=1)?parseFloat(query[0]):0"]
}
}
},
Expand All @@ -92,7 +92,7 @@
"fields": {
"seedingSize": {
"selector": ["table.table-condensed.table-striped.table-bordered:first td:contains('Seeding Size') + td", "table.table-condensed.table-striped.table-bordered:first td:contains('做种体积') + td", "table.table-condensed.table-striped.table-bordered:first td:contains('做種體積') + td"],
"filters": ["query.text().trim().replace(/,/g,'').sizeToNumber()"]
"filters": ["query.text().trim().replace(/,|\\s|\\n/g,'').sizeToNumber()"]
},
"levelName": {
"selector": "div.content span.badge-user"
Expand Down
51 changes: 1 addition & 50 deletions resource/sites/asiancinema.me/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,55 +20,6 @@
"replaceKey": [
"tt", ""
]
}],
"fieldSelector": {
"progress": {
"selector": ["button.btn.btn-success.btn-circle", "button.btn.btn-warning.btn-circle, button.btn.btn-info.btn-circle", ""],
"switchFilters": [
["100"],
["0"],
["null"]
]
},
"status": {
"selector": ["button.btn.btn-success.btn-circle", "button.btn.btn-warning.btn-circle", "button.btn.btn-info.btn-circle"],
"switchFilters": [
["2"],
["1"],
["3"]
]
}
}
},
"selectors": {
"userBaseInfo": {
"page": "/",
"fields": {
"name": {
"selector": ["a[href*='settings']:first"],
"attribute": "href",
"switchFilters": [
["query.match(/users\\/(.+)\\/settings/)", "(query && query.length>=2)?(query[1]):''"],
["query ? query.getQueryString('id'):''"]
]
},
"uploaded": {
"selector": ["span[title='Upload']", "span[title='上传']"],
"filters": ["query.text().trim().replace(/,/g,'')", "(query && query.length>=1)?query.sizeToNumber():0"]
},
"downloaded": {
"selector": ["span[title='Download']", "span[title='下载']"],
"filters": ["query.text().trim().replace(/,/g,'')", "(query && query.length>=1)?query.sizeToNumber():0"]
},
"bonus": {
"selector": ["a[title='My Bonus Points']", "a[title='我的魔力']"],
"filters": ["query.text().trim().replace(/ /g,'')"]
},
"seeding": {
"selector": ["span[title='Seeding']", "span[title='做种']"],
"filters": ["query.text().trim().replace(/,|\\n/g,'')"]
}
}
}
}]
}
}
2 changes: 1 addition & 1 deletion resource/sites/blutopia.xyz/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"icon": "https://blutopia.xyz/favicon.ico",
"tags": ["影视", "综合"],
"host": "blutopia.xyz",
"collaborator": ["bimzcy", "lengmianxia"]
"collaborator": ["bimzcy", "lengmianxia", "bright"]
}

0 comments on commit 049b4ad

Please sign in to comment.