Skip to content

Commit

Permalink
feat: BTN添加做种信息
Browse files Browse the repository at this point in the history
  • Loading branch information
enigmazack committed Aug 17, 2021
1 parent 152aa3d commit 9bb683e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions resource/sites/broadcasthe.net/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@
]
}
}
},
"userSeedingTorrents": {
"page": "/bonus.php?action=rate",
"fields": {
"seedingList": {
"selector": ["a[href*='torrentid=']"],
"filters": ["jQuery.map(query, item=>$(item).attr('href').match(/torrentid=(\\d+)/)[1])"]
}
}
}
},
"supportedFeatures": {
Expand Down
5 changes: 5 additions & 0 deletions resource/sites/broadcasthe.net/getSearchResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
const row = rows.eq(index);
let cells = row.find(">td");

// id
let id = row.find("a[href*='torrentid=']").first().attr("href")
id = id.match(/torrentid=(\d+)/)[1]

// 标题
let title = row.find("[style='float:none;']").first().attr("title");

Expand All @@ -112,6 +116,7 @@
let timeStr = (timeStrMatch && timeStrMatch.length >=2) ? timeStrMatch[1].trim() : "";

let data = {
id,
title,
link,
url,
Expand Down

0 comments on commit 9bb683e

Please sign in to comment.