Skip to content

Commit

Permalink
fix(pornbits): 刷新数据报错
Browse files Browse the repository at this point in the history
#1112
不过由于很多站在未登录情况下都会有报错,故不处理未登录的情况
  • Loading branch information
ted423 committed Sep 5, 2022
1 parent adc07b4 commit fefa63f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions resource/sites/pornbits.net/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,21 @@
"userBaseInfo": {
"page": "/",
"fields": {
"isLogged": {
"selector": ["a[href='/logout']"],
"filters": ["query.length>0"]
},
"name": {
"selector": ["#subnav > div > div > ul > li.dropdown.pull-right > a > span.hidden-sm"],
"filters": ["query.text()"]
},
"uploaded": {
"selector": ["#header > div > div > div > span.navbar-text.stats.hidden-sm"],
"filters": ["query.text().split(':')[1].split('D')[0].trim()", "query.replace(/,/g,'').sizeToNumber()"]
"selector": ["abbr.upload"],
"filters": ["query.next().text().trim()", "query.replace(/,/g,'').sizeToNumber()"]
},
"downloaded": {
"selector": ["#header > div > div > div > span.navbar-text.stats.hidden-sm"],
"filters": ["query.text().split(':')[2].split('R')[0].replace(/Bytes/g,'').trim()", "query.replace(/,/g,'').sizeToNumber()"]
"selector": ["abbr.download"],
"filters": ["if(query[0])$(query[0].nextSibling).text().trim().replace(/,/g,'').sizeToNumber()"]
}
}
},
Expand All @@ -44,7 +48,7 @@
},
"seeding": {
"selector": ["#content > div > div.col-md-9 > div:nth-child(5) > div.panel-heading > h4"],
"filters": ["query.text().split(':')[1].split('L')[0].trim()"]
"filters": ["if(query[0]&&query.text().split(':')[1])query.text().split(':')[1].split('L')[0].trim()"]
},
"seedingSize": {
"value": -1
Expand Down

0 comments on commit fefa63f

Please sign in to comment.