Skip to content

Commit

Permalink
feat(MTV): support 工具栏
Browse files Browse the repository at this point in the history
confirmSize is not work yet
  • Loading branch information
ted423 committed Sep 7, 2022
1 parent 09ef51c commit fb054aa
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions resource/sites/www.morethantv.me/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@
"timezoneOffset": "+0000",
"description": "",
"icon": "https://www.morethantv.me/favicon.ico",
"schema": "Luminance",
"schema": "Common",
"tags": ["电视剧", "剧集"],
"url": "https://www.morethantv.me",
"collaborator": "luckiestone",
"host": "www.morethantv.me",
"formerHosts": [
"www.morethan.tv"
],
"supportedFeatures": {
"search": false,
"imdbSearch": false
},
"plugins": [{
"name": "种子详情页面",
"pages": ["/torrents.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/details.js"]
}, {
"name": "种子列表",
"pages": ["/torrents/browse", "/show/(\\d+)/$","/collages.php"],
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/torrents.js"]
}],
"selectors": {
"userBaseInfo": {
"merge": true,
Expand Down Expand Up @@ -74,6 +79,27 @@
"filters": ["query.attr('title')||query.text()", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
}
}
},
"common": {
"page": "/torrents.php",
"fields": {
"downloadURL": {
"selector": ["tr[id*='torrentinfo'][class!='hidden']"],
"filters": ["query.prev().find(\"a[href*='action=download']\").attr('href')"]
},
"size": {
"selector": ["tr.group_torrent > td.nobr"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"]
},
"downloadURLs": {
"selector": ["a[href*='action=download']"],
"filters": ["query.toArray()"]
},
"confirmSize": {
"selector": ["tr.group_torrent > td.nobr"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"]
}
}
}
}
}

0 comments on commit fb054aa

Please sign in to comment.