diff --git a/lib/config.js b/lib/config.js index f5caf3b5d9..5b875cc0cc 100644 --- a/lib/config.js +++ b/lib/config.js @@ -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: { diff --git a/lib/routes/universities/bupt/funbox.js b/lib/routes/universities/bupt/funbox.js index 9057c2b49c..f0facf769d 100644 --- a/lib/routes/universities/bupt/funbox.js +++ b/lib/routes/universities/bupt/funbox.js @@ -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`,