Skip to content

Commit

Permalink
feat: SpeedApp 搜索完善
Browse files Browse the repository at this point in the history
  • Loading branch information
ted423 committed Jun 1, 2022
1 parent 56cee38 commit bf072b9
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions resource/sites/speedapp.io/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"resultType": "html",
"resultSelector": "div.card-body.p-0",
"dataRowSelector": "div.row.mr-0.ml-0.py-3",
"dataSellSelector": ">div",
"dataCellSelector": ">div",
"fieldIndex": {
"category": 0,
"title": 0,
Expand All @@ -38,6 +38,26 @@
"title": {
"selector": ["a[data-poload]"],
"filters": ["query.text()"]
},
"category": {
"selector": ["use"],
"filters": ["query.attr('xlink:href').split('#')[1]"]
},
"time": {
"selector": [""],
"filters": ["query.attr('title')","dateTime(query).valueOf()?dateTime(query):query"]
},
"seeders": {
"selector": ["span:contains('seeders')"],
"filters": ["parseInt(query.text().replace('seeders','').replace(/,/g,''))"]
},
"leechers": {
"selector": ["span:contains('leechers')"],
"filters": ["parseInt(query.text().replace('leechers','').replace(/,/g,''))"]
},
"comments": {
"selector": ["a:contains('comments')"],
"filters": ["parseInt(query.text().replace('comments','').replace(/,/g,''))"]
},
"link": {
"selector": ["a[data-poload]"],
Expand All @@ -46,10 +66,6 @@
"url": {
"selector": ["a.btn.btn-success"],
"filters": ["query.children().attr('href')", "'https://speedapp.io/'+query"]
},
"time": {
"selector": ["div.col-6.col-sm-4[data-original-title]"],
"filters": ["dateTime(query).isValid()?dateTime(query).valueOf():query"]
}
}
},
Expand Down Expand Up @@ -84,8 +100,8 @@
"filters": ["query.length>0"]
},
"messageCount": {
"selector": ["#notifications-oc-toggle"],
"filters": [""]
"selector": ["#notifications-oc-toggle > div.btn > label-danger"],
"filters": ["query.length?parseInt(query.text()):0"]
},
"uploaded": {
"selector": ["dt:contains('已上传') + dd","dt:contains('Uploaded') + dd","dt:contains('Incarcat') + dd"],
Expand Down Expand Up @@ -131,7 +147,7 @@
"page": "/torrents-details.php",
"fields": {
"downloadURL": {
"selector": ["a[href*='download.php?id=']"],
"selector": ["a[href*='.torrent']"],
"filters": ["query.attr('href')"]
},
"size": {
Expand All @@ -143,7 +159,7 @@
"filters": ["query"]
},
"downloadURLs": {
"selector": ["a[href*='download.php?id=']"],
"selector": ["a[href*='.torrent']"],
"filters": ["query.toArray()"]
},
"confirmSize": {
Expand Down

0 comments on commit bf072b9

Please sign in to comment.