Update index.js
Browse files
index.js
CHANGED
@@ -76,7 +76,7 @@ app.get('/*', async (req, res) => {
|
|
76 |
// 删除掉不需要的部分
|
77 |
let extractedString = coreContent[0];
|
78 |
extractedString = extractedString.replace('[CDATA[', '').replace('//]]', '').replace('https:\/\/r.bing.com', '');
|
79 |
-
extractedString = extractedString.replace(/\\\/rp\\\//g,
|
80 |
extractedString = extractedString.replace(/https:\\\/\\\/r\.bing\.com/g, ''); // 删除 https:\/\/r.bing.com 字符串
|
81 |
res.set('Content-Type', 'text/plain');
|
82 |
res.send(extractedString); // 发送提取后的字符串
|
|
|
76 |
// 删除掉不需要的部分
|
77 |
let extractedString = coreContent[0];
|
78 |
extractedString = extractedString.replace('[CDATA[', '').replace('//]]', '').replace('https:\/\/r.bing.com', '');
|
79 |
+
extractedString = extractedString.replace(/\\\/rp\\\//g, `https://${rehost}/rp/`); // 使用模板字符串
|
80 |
extractedString = extractedString.replace(/https:\\\/\\\/r\.bing\.com/g, ''); // 删除 https:\/\/r.bing.com 字符串
|
81 |
res.set('Content-Type', 'text/plain');
|
82 |
res.send(extractedString); // 发送提取后的字符串
|