fix: btbyr (#5833)

This commit is contained in:
prnake
2020-10-09 20:57:27 +01:00
committed by GitHub
parent 09ca4c000f
commit 0c0bbd4009
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ const calculateValue = () => {
bearertoken: envs.INITIUM_BEARER_TOKEN,
},
btbyr: {
host: envs.BTBYR_HOST || 'https://bt.byr.cn/',
host: envs.BTBYR_HOST,
cookies: envs.BTBYR_COOKIE,
},
mastodon: {
+2 -1
View File
@@ -4,7 +4,7 @@ const cheerio = require('cheerio');
module.exports = async (ctx) => {
const cookie = config.btbyr.cookies;
const url = config.btbyr.host;
const url = config.btbyr.host || 'https://bt.byr.cn/';
const response = await got({
method: 'get',
url: url + `log.php?action=funbox`,
@@ -24,6 +24,7 @@ module.exports = async (ctx) => {
.find('tr > td.rowfollow')
.eq(2)
.html()
.replace(/https:\/\/bt.byr.cn\//g, url)
.replace(/onclick=.*findPosition\(this\)\[1\]-58\);"/g, '')
.replace(/.thumb.jpg/g, ''),
link: url + `log.php?action=funbox`,