lix02 commited on
Commit
82d05b1
·
verified ·
1 Parent(s): b7e80c8

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +6 -5
index.js CHANGED
@@ -80,7 +80,12 @@ app.get('/*', async (req, res) => {
80
  extractedString = extractedString.replace(/https:\\\/\\\/r\.bing\.com/g, ''); // 删除 https:\/\/r.bing.com 字符串
81
  res.set('Content-Type', 'text/plain');
82
  res.send(extractedString); // 发送提取后的字符串
83
- } else if (req.path === '/importmap') {
 
 
 
 
 
84
  // 提取以 <script type="importmap" nonce=""> 开始,以 </script> 结尾的字符串
85
  const importmapContent = result.htmlContent.match(/<script type="importmap" nonce="">.*?<\/script>/s);
86
  if (importmapContent) {
@@ -90,10 +95,6 @@ app.get('/*', async (req, res) => {
90
  res.set('Content-Type', 'text/plain');
91
  res.send('没有找到map匹配的字符串');
92
  }
93
- } else {
94
- res.set('Content-Type', 'text/plain');
95
- res.send('没有找到Core匹配的字符串');
96
- }
97
  } else {
98
  res.set('Content-Type', 'text/plain');
99
  res.send(result.scripts); // 发送 scripts 的纯文本响应
 
80
  extractedString = extractedString.replace(/https:\\\/\\\/r\.bing\.com/g, ''); // 删除 https:\/\/r.bing.com 字符串
81
  res.set('Content-Type', 'text/plain');
82
  res.send(extractedString); // 发送提取后的字符串
83
+
84
+ } else {
85
+ res.set('Content-Type', 'text/plain');
86
+ res.send('没有找到Core匹配的字符串');
87
+ }
88
+ } else if (req.path === '/importmap') {
89
  // 提取以 <script type="importmap" nonce=""> 开始,以 </script> 结尾的字符串
90
  const importmapContent = result.htmlContent.match(/<script type="importmap" nonce="">.*?<\/script>/s);
91
  if (importmapContent) {
 
95
  res.set('Content-Type', 'text/plain');
96
  res.send('没有找到map匹配的字符串');
97
  }
 
 
 
 
98
  } else {
99
  res.set('Content-Type', 'text/plain');
100
  res.send(result.scripts); // 发送 scripts 的纯文本响应