网站首页 >> 源码 >> 正文
标题

百度收录批量检查器,支持一键检测,TXT文本导入

逍遥   01月02日 13:19   6℃   0
内容

废话不多说 ,直接上图

百度收录批量检查器,支持一键检测,TXT文本导入,image.png,百度收录批量检查器,百度收录,第1张

经过检测,状态精准 ,有需要可以试试

使用教程

  1. 安装 Node.js(官网https://nodejs.org/ 下载 LTS 版本);

  2. 创建proxy.js文件 ,粘贴以下代码:

// 精准版本地代理(无强制兜底,返回真实结果)
const express = require('express');
const cors = require('cors');
const axios = require('axios');
const app = express();

// 允许所有跨域请求
app.use(cors({
  origin: '*',
  methods: ['GET', 'POST'],
  allowedHeaders: ['*']
}));
app.use(express.json());
app.use(express.urlencoded({ extended: true }));

// 核心代理接口(返回真实百度响应)
app.get('/proxy', async (req, res) => {
  try {
    const targetUrl = req.query.url;
    if (!targetUrl) {
      return res.status(400).send('缺少URL参数');
    }

    console.log('代理请求:', decodeURIComponent(targetUrl));
    
    const response = await axios.get(decodeURIComponent(targetUrl), {
      headers: {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36',
        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
        'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8',
        'Referer': 'https://www.baidu.com/',
        'Cache-Control': 'no-cache',
        'Pragma': 'no-cache'
      },
      timeout: 30000,
      followRedirects: true,
      decompress: true,
      maxRedirects: 5
    });

    // 返回真实的百度响应(无修改)
    res.setHeader('Content-Type', 'text/html; charset=utf-8');
    res.send(response.data);
  } catch (error) {
    console.error('代理失败:', error.message);
    // 返回真实错误,不兜底为已收录
    res.status(500).send(`<html>代理请求失败:${error.message}</html>`);
  }
});

// 启动代理(自动检测可用端口)
async function startProxy() {
  let port = 8080;
  while (port <= 8090) {
    try {
      app.listen(port, () => {
        console.log(`✅ 精准版代理已启动	,地址:http://localhost:${port}`);
        console.log(`📌 检测器需配置:http://localhost:${port}/proxy?url=`);
      });
      break;
    } catch (e) {
      port++;
    }
  }
  if (port > 8090) {
    console.error('❌ 8080-8090端口均被占用,请关闭占用程序后重试');
  }
}

startProxy();
  1. 打开终端,执行:

npm install express cors axios
node proxy.js
  1. 看到以下提示 ,说明代理启动成功:

✅ 本地代理已启动,地址:http://localhost:8080
📌 请勿关闭此窗口,关闭则代理失效


附件
jiance.html
下载文件
附件购买
售价:5 积分

登录注册购买