Skill: wsh66660/baidu-search-node (version 1.1.0)

# Baidu Search Skill 百度搜索命令行工具，通过 Node.js 脚本爬取百度搜索结果（无需 API key）。 ## 激活条件 当用户提到： - 百度搜索 - 用百度搜一下 - baidu search - 使用 `baidu_search` 工具 ## 工具实现 使用 `baidusearch.js` 脚本，位于 `/Users/mac/.openclaw/workspace/skills/baidu-search/baidusearch.js` ### 使用方式 ```bash # 基本搜索 node baidusearch.js "搜索内容" # 指定结果数量 node baidusearch.js "搜索内容" -n 10 # 调试模式 node baidusearch.js "搜索内容" -n 5 -d 1 ``` ### 参数说明 | 参数 | 类型 | 必需 | 默认值 | 说明 | |------|------|------|--------|------| | `[keyword]` | string | 是 | - | 搜索关键字 | | `-n, --num` | number | 否 | 10 | 返回结果数量 | | `-d, --debug` | number | 否 | 0 | 调试模式（0-关闭，1-打开） | ### 返回格式 每条搜索结果包含： - `rank` - 排名 - `title` - 标题 - `abstract` - 摘要/描述 - `url` - 链接 ## 与百度官方 API 技能对比 | 功能 | baidu-search-node (本技能) | baidu-search (官方 API) | |------|---------------------------|------------------------| | API Key | ❌ 不需要 | ✅ 需要 BAIDU_API_KEY | | 资源类型过滤 | ❌ 仅网页 | ✅ web/video/image/aladdin | | 时间过滤 | ❌ 不支持 | ✅ week/month/semiyear/year | | 网站过滤 | ❌ 不支持 | ✅ 匹配/屏蔽网站 | | 安全搜索 | ❌ 不支持 | ✅ 支持 | | 实现方式 | 网页爬虫 | 百度千帆 API | ## 配置 在 `openclaw.json` 中添加： ```json5 { tools: { baiduSearch: { enabled: true, scriptPath: "/Users/mac/.openclaw/workspace/skills/baidu-search/baidusearch.js", defaultCount: 5, timeout: 30000, }, }, } ``` ## 使用方法 ```javascript // 执行百度搜索 const { execSync } = require('child_process'); function baiduSearch(query, count = 5) { const scriptPath = '/Users/mac/.openclaw/workspace/skills/baidu-search/baidusearch.js'; const cmd = `node "${scriptPath}" "${query}" -n ${count}`; const output = execSync(cmd, { encoding: 'utf-8' }); return parseOutput(output); } ``` ## 依赖安装 ```bash # 进入 skill 目录 cd /Users/mac/.openclaw/workspace/skills/baidu-search # 安装依赖 npm install axios cheerio commander ``` ## 注意事项 - 需要 Node.js 环境 - 依赖 axios、cheerio、commander 包 - 搜索结果来自百度网页，可能包含广告 - 建议设置合理的 timeout 避免请求超时 - 无需 API key，开箱即用

path: baidusearch.js
content: #!/usr/bin/env node

const axios = require('axios');
const cheerio = require('cheerio');
const { program } = require('commander');

const ABSTRACT_MAX_LENGTH = 300; // abstract max length

const user_agents = [
    'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36',
    'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
    'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/49.0.2623.108 Chrome/49.0.2623.108 Safari/537.36',
    'Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR) AppleWebKit/533.3 (KHTML, like Gecko) QtWeb Internet Browser/3.7 http://www.QtWeb.net',
    'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36',
    'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.2 (KHTML, like Gecko) ChromePlus/4.0.222.3 Chrome/4.0.222.3 Safari/532.2',
    'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4pre) Gecko/20070404 K-Ninja/2.1.3',
    'Mozilla/5.0 (Future Star Technologies Corp.; Star-Blade OS; x86_64; U; en-US) iNet Browser 4.7',
    'Mozilla/5.0 (Windows; U; Windows NT 6.1; rv:2.2) Gecko/20110201',
    'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080414 Firefox/2.0.0.13 Pogo/2.0.0.13.6866'
];

// 请求头信息
const HEADERS = {
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
    "Content-Type": "application/x-www-form-urlencoded",
    "User-Agent": 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36',
    "Referer": "https://www.baidu.com/",
    "Accept-Encoding": "gzip, deflate",
    "Accept-Language": "zh-CN,zh;q=0.9"
};

const baidu_host_url = "https://www.baidu.com";
const baidu_search_url = "https://www.baidu.com/s?ie=utf-8&tn=baidu&wd=";

// 创建axios实例
const axiosInstance = axios.create({
    headers: HEADERS,
    timeout: 10000
});

/**
 * 通过关键字进行搜索
 * @param {string} keyword - 关键字
 * @param {number} num_results - 指定返回的结果个数
 * @param {number} debug - 调试模式，0-关闭，1-打开
 * @returns {Promise<Array>} 结果列表
 */
async function search(keyword, num_results = 10, debug = 0) {
    if (!keyword) {
        return null;
    }

    const list_result = [];
    let page = 1;

    // 起始搜索的url
    let next_url = baidu_search_url + encodeURIComponent(keyword);

    // 循环遍历每一页的搜索结果，并返回下一页的url
    while (list_result.length < num_results) {
        const [data, next] = await parse_html(next_url, list_result.length, debug);
        if (data && data.length > 0) {
            list_result.push(...data);
            if (debug) {
                console.log(`---searching[${keyword}], finish parsing page ${page}, results number=${data.length}: `);
                for (const d of data) {
                    console.log(JSON.stringify(d));
                }
            }
        }

        if (!next) {
            if (debug) {
                console.log("already search the last page");
            }
            break;
        }
        next_url = next;
        page++;
    }

    if (debug) {
        console.log(`\n---search [${keyword}] finished. total results number=${list_result.length}！`);
    }
    return list_result.slice(0, num_results);
}

/**
 * 解析处理结果
 * @param {string} url - 需要抓取的 url
 * @param {number} rank_start - 排名起始值
 * @param {number} debug - 调试模式，0-关闭，1-打开
 * @returns {Promise<Array>} 结果列表，下一页的url
 */
async function parse_html(url, rank_start = 0, debug = 0) {
    try {
        const res = await axiosInstance.get(url);
        const $ = cheerio.load(res.data);

        const list_data = [];
        const div_contents = $('#content_left');
        
        div_contents.children().each((index, div) => {
            const class_list = $(div).attr('class') ? $(div).attr('class').split(' ') : [];
            if (!class_list.length) {
                return;
            }

            if (!class_list.includes('c-container')) {
                return;
            }

            let title = '';
            let url = '';
            let abstract = '';

            try {
                // 遍历所有找到的结果，取得标题和概要内容
                if (class_list.includes('xpath-log')) {
                    if ($(div).find('h3').length > 0) {
                        title = $(div).find('h3').text().trim();
                        url = $(div).find('h3 a').attr('href') ? $(div).find('h3 a').attr('href').trim() : '';
                    } else {
                        const text = $(div).text().trim();
                        title = text.split('\n')[0];
                        if ($(div).find('a').length > 0) {
                            url = $(div).find('a').first().attr('href') ? $(div).find('a').first().attr('href').trim() : '';
                        }
                    }

                    if ($(div).find('.c-abstract').length > 0) {
                        abstract = $(div).find('.c-abstract').text().trim();
                    } else if ($(div).find('div').length > 0) {
                        abstract = $(div).find('div').first().text().trim();
                    } else {
                        const text = $(div).text().trim();
                        const parts = text.split('\n');
                        if (parts.length > 1) {
                            abstract = parts[1].trim();
                        }
                    }
                } else if (class_list.includes('result-op')) {
                    if ($(div).find('h3').length > 0) {
                        title = $(div).find('h3').text().trim();
                        url = $(div).find('h3 a').attr('href') ? $(div).find('h3 a').attr('href').trim() : '';
                    } else {
                        const text = $(div).text().trim();
                        title = text.split('\n')[0];
                        if ($(div).find('a').length > 0) {
                            url = $(div).find('a').first().attr('href') ? $(div).find('a').first().attr('href').trim() : '';
                        }
                    }
                    if ($(div).find('.c-abstract').length > 0) {
                        abstract = $(div).find('.c-abstract').text().trim();
                    } else if ($(div).find('div').length > 0) {
                        abstract = $(div).find('div').first().text().trim();
                    } else {
                        const text = $(div).text().trim();
                        const parts = text.split('\n');
                        if (parts.length > 1) {
                            abstract = parts[1].trim();
                        }
                    }
                } else {
                    const tpl = $(div).attr('tpl') || '';
                    if (tpl !== 'se_com_default') {
                        if (tpl === 'se_st_com_abstract') {
                            if ($(div).children().length >= 1) {
                                if ($(div).find('h3').length > 0) {
                                    title = $(div).find('h3').text().trim();
                                }
                                if ($(div).find('.c-abstract').length > 0) {
                                    abstract = $(div).find('.c-abstract').text().trim();
                                } else if ($(div).find('div').length > 0) {
                                    abstract = $(div).find('div').first().text().trim();
                                } else {
                                    abstract = $(div).text().trim();
                                }
                            }
                        } else {
                            if ($(div).children().length >= 2) {
                                if ($(div).find('h3').length > 0) {
                                    title = $(div).find('h3').text().trim();
                                    url = $(div).find('h3 a').attr('href') ? $(div).find('h3 a').attr('href').trim() : '';
                                } else {
                                    title = $(div).children().first().text().trim();
                                    if ($(div).find('h3 a').length > 0) {
                                        url = $(div).find('h3 a').attr('href') ? $(div).find('h3 a').attr('href').trim() : '';
                                    }
                                }
                                if ($(div).find('.c-abstract').length > 0) {
                                    abstract = $(div).find('.c-abstract').text().trim();
                                } else if ($(div).find('div').length > 0) {
                                    abstract = $(div).find('div').first().text().trim();
                                } else {
                                    abstract = $(div).text().trim();
                                }
                            }
                        }
                    } else {
                        if ($(div).find('h3').length > 0) {
                            title = $(div).find('h3').text().trim();
                            url = $(div).find('h3 a').attr('href') ? $(div).find('h3 a').attr('href').trim() : '';
                        } else {
                            title = $(div).children().first().text().trim();
                            if ($(div).find('h3 a').length > 0) {
                                url = $(div).find('h3 a').attr('href') ? $(div).find('h3 a').attr('href').trim() : '';
                            }
                        }
                        if ($(div).find('.c-abstract').length > 0) {
                            abstract = $(div).find('.c-abstract').text().trim();
                        } else if ($(div).find('div').length > 0) {
                            abstract = $(div).find('div').first().text().trim();
                        } else {
                            abstract = $(div).text().trim();
                        }
                    }
                }
            } catch (e) {
                if (debug) {
                    console.log(`catch exception duration parsing page html, e=${e}`);
                }
                return;
            }

            if (ABSTRACT_MAX_LENGTH && abstract.length > ABSTRACT_MAX_LENGTH) {
                abstract = abstract.substring(0, ABSTRACT_MAX_LENGTH);
            }

            rank_start++;
            list_data.push({ title, abstract, url, rank: rank_start });
        });

        // 找到下一页按钮
        const next_btn = $('a.n');

        // 已经是最后一页了，没有下一页了，此时只返回数据不再获取下一页的链接
        if (next_btn.length <= 0 || next_btn.last().text().includes('上一页')) {
            return [list_data, null];
        }

        const next_url = baidu_host_url + next_btn.last().attr('href');
        return [list_data, next_url];
    } catch (e) {
        if (debug) {
            console.log(`catch exception duration parsing page html, e：${e}`);
        }
        return [null, null];
    }
}

/**
 * 主程序入口，支持命令行带参执行或者手动输入关键字
 */
async function run() {
    const default_keyword = "Amazing Coder";
    let num_results = 10;
    let debug = 0;

    program
        .name('baidusearch')
        .description('百度搜索命令行工具')
        .version('1.0.0')
        .argument('[keyword]', '搜索关键字')
        .option('-n, --num <number>', '结果数量', parseInt, 10)
        .option('-d, --debug <number>', '调试模式，0-关闭，1-打开', parseInt, 0)
        .action((keyword, options) => {
            if (keyword) {
                runSearch(keyword, options.num, options.debug);
            } else {
                // 没有提供关键字，使用默认值
                runSearch(default_keyword, options.num, options.debug);
            }
        });

    program.parse(process.argv);
}

async function runSearch(keyword, num_results, debug) {
    console.log(`---start search: [${keyword}], expected number of results:[${num_results}].`);
    const results = await search(keyword, num_results, debug);

    if (Array.isArray(results)) {
        console.log(`search results：(total[${results.length}]items.)`);
        for (const res of results) {
            console.log(`${res.rank}. ${res.title}\n   ${res.abstract}\n   ${res.url}`);
        }
    } else {
        console.log(`start search: [${keyword}] failed.`);
    }
}

// 导出函数
module.exports = {
    search,
    parse_html
};

// 如果直接运行此文件，则执行主程序
if (require.main === module) {
    run();
}


path: package-lock.json
content: {
  "name": "baidu-search",
  "version": "1.0.0",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "baidu-search",
      "version": "1.0.0",
      "license": "ISC",
      "dependencies": {
        "axios": "^1.13.5",
        "cheerio": "^1.2.0",
        "commander": "^14.0.3"
      }
    },
    "node_modules/asynckit": {
      "version": "0.4.0",
      "resolved": "https://r2.cnpmjs.org/asynckit/-/asynckit-0.4.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/axios": {
      "version": "1.13.5",
      "resolved": "https://r.cnpmjs.org/axios/-/axios-1.13.5.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "follow-redirects": "^1.15.11",
        "form-data": "^4.0.5",
        "proxy-from-env": "^1.1.0"
      }
    },
    "node_modules/boolbase": {
      "version": "1.0.0",
      "resolved": "https://r2.cnpmjs.org/boolbase/-/boolbase-1.0.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "ISC"
    },
    "node_modules/call-bind-apply-helpers": {
      "version": "1.0.2",
      "resolved": "https://r.cnpmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "es-errors": "^1.3.0",
        "function-bind": "^1.1.2"
      },
      "engines": {
        "node": ">= 0.4"
      }
    },
    "node_modules/cheerio": {
      "version": "1.2.0",
      "resolved": "https://r.cnpmjs.org/cheerio/-/cheerio-1.2.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "cheerio-select": "^2.1.0",
        "dom-serializer": "^2.0.0",
        "domhandler": "^5.0.3",
        "domutils": "^3.2.2",
        "encoding-sniffer": "^0.2.1",
        "htmlparser2": "^10.1.0",
        "parse5": "^7.3.0",
        "parse5-htmlparser2-tree-adapter": "^7.1.0",
        "parse5-parser-stream": "^7.1.2",
        "undici": "^7.19.0",
        "whatwg-mimetype": "^4.0.0"
      },
      "engines": {
        "node": ">=20.18.1"
      },
      "funding": {
        "url": "https://github.com/cheeriojs/cheerio?sponsor=1"
      }
    },
    "node_modules/cheerio-select": {
      "version": "2.1.0",
      "resolved": "https://r.cnpmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-2-Clause",
      "dependencies": {
        "boolbase": "^1.0.0",
        "css-select": "^5.1.0",
        "css-what": "^6.1.0",
        "domelementtype": "^2.3.0",
        "domhandler": "^5.0.3",
        "domutils": "^3.0.1"
      },
      "funding": {
        "url": "https://github.com/sponsors/fb55"
      }
    },
    "node_modules/combined-stream": {
      "version": "1.0.8",
      "resolved": "https://r2.cnpmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "delayed-stream": "~1.0.0"
      },
      "engines": {
        "node": ">= 0.8"
      }
    },
    "node_modules/commander": {
      "version": "14.0.3",
      "resolved": "https://r.cnpmjs.org/commander/-/commander-14.0.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">=20"
      }
    },
    "node_modules/css-select": {
      "version": "5.2.2",
      "resolved": "https://r.cnpmjs.org/css-select/-/css-select-5.2.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-2-Clause",
      "dependencies": {
        "boolbase": "^1.0.0",
        "css-what": "^6.1.0",
        "domhandler": "^5.0.2",
        "domutils": "^3.0.1",
        "nth-check": "^2.0.1"
      },
      "funding": {
        "url": "https://github.com/sponsors/fb55"
      }
    },
    "node_modules/css-what": {
      "version": "6.2.2",
      "resolved": "https://r.cnpmjs.org/css-what/-/css-what-6.2.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-2-Clause",
      "engines": {
        "node": ">= 6"
      },
      "funding": {
        "url": "https://github.com/sponsors/fb55"
      }
    },
    "node_modules/delayed-stream": {
      "version": "1.0.0",
      "resolved": "https://r2.cnpmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">=0.4.0"
      }
    },
    "node_modules/dom-serializer": {
      "version": "2.0.0",
      "resolved": "https://r.cnpmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "domelementtype": "^2.3.0",
        "domhandler": "^5.0.2",
        "entities": "^4.2.0"
      },
      "funding": {
        "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
      }
    },
    "node_modules/domelementtype": {
      "version": "2.3.0",
      "resolved": "https://r.cnpmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
      "integrity": [REDACTED_SECRET],
      "funding": [
        {
          "type": "github",
          "url": "https://github.com/sponsors/fb55"
        }
      ],
      "license": "BSD-2-Clause"
    },
    "node_modules/domhandler": {
      "version": "5.0.3",
      "resolved": "https://r.cnpmjs.org/domhandler/-/domhandler-5.0.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-2-Clause",
      "dependencies": {
        "domelementtype": "^2.3.0"
      },
      "engines": {
        "node": ">= 4"
      },
      "funding": {
        "url": "https://github.com/fb55/domhandler?sponsor=1"
      }
    },
    "node_modules/domutils": {
      "version": "3.2.2",
      "resolved": "https://r.cnpmjs.org/domutils/-/domutils-3.2.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-2-Clause",
      "dependencies": {
        "dom-serializer": "^2.0.0",
        "domelementtype": "^2.3.0",
        "domhandler": "^5.0.3"
      },
      "funding": {
        "url": "https://github.com/fb55/domutils?sponsor=1"
      }
    },
    "node_modules/dunder-proto": {
      "version": "1.0.1",
      "resolved": "https://r.cnpmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "call-bind-apply-helpers": "^1.0.1",
        "es-errors": "^1.3.0",
        "gopd": "^1.2.0"
      },
      "engines": {
        "node": ">= 0.4"
      }
    },
    "node_modules/encoding-sniffer": {
      "version": "0.2.1",
      "resolved": "https://r.cnpmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "iconv-lite": "^0.6.3",
        "whatwg-encoding": "^3.1.1"
      },
      "funding": {
        "url": "https://github.com/fb55/encoding-sniffer?sponsor=1"
      }
    },
    "node_modules/entities": {
      "version": "4.5.0",
      "resolved": "https://r.cnpmjs.org/entities/-/entities-4.5.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-2-Clause",
      "engines": {
        "node": ">=0.12"
      },
      "funding": {
        "url": "https://github.com/fb55/entities?sponsor=1"
      }
    },
    "node_modules/es-define-property": {
      "version": "1.0.1",
      "resolved": "https://r.cnpmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">= 0.4"
      }
    },
    "node_modules/es-errors": {
      "version": "1.3.0",
      "resolved": "https://r.cnpmjs.org/es-errors/-/es-errors-1.3.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">= 0.4"
      }
    },
    "node_modules/es-object-atoms": {
      "version": "1.1.1",
      "resolved": "https://r.cnpmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "es-errors": "^1.3.0"
      },
      "engines": {
        "node": ">= 0.4"
      }
    },
    "node_modules/es-set-tostringtag": {
      "version": "2.1.0",
      "resolved": "https://r.cnpmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "es-errors": "^1.3.0",
        "get-intrinsic": "^1.2.6",
        "has-tostringtag": "^1.0.2",
        "hasown": "^2.0.2"
      },
      "engines": {
        "node": ">= 0.4"
      }
    },
    "node_modules/follow-redirects": {
      "version": "1.15.11",
      "resolved": "https://r.cnpmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz",
      "integrity": [REDACTED_SECRET],
      "funding": [
        {
          "type": "individual",
          "url": "https://github.com/sponsors/RubenVerborgh"
        }
      ],
      "license": "MIT",
      "engines": {
        "node": ">=4.0"
      },
      "peerDependenciesMeta": {
        "debug": {
          "optional": true
        }
      }
    },
    "node_modules/form-data": {
      "version": "4.0.5",
      "resolved": "https://r.cnpmjs.org/form-data/-/form-data-4.0.5.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "asynckit": "^0.4.0",
        "combined-stream": "^1.0.8",
        "es-set-tostringtag": "^2.1.0",
        "hasown": "^2.0.2",
        "mime-types": "^2.1.12"
      },
      "engines": {
        "node": ">= 6"
      }
    },
    "node_modules/function-bind": {
      "version": "1.1.2",
      "resolved": "https://r.cnpmjs.org/function-bind/-/function-bind-1.1.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "funding": {
        "url": "https://github.com/sponsors/ljharb"
      }
    },
    "node_modules/get-intrinsic": {
      "version": "1.3.0",
      "resolved": "https://r.cnpmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "call-bind-apply-helpers": "^1.0.2",
        "es-define-property": "^1.0.1",
        "es-errors": "^1.3.0",
        "es-object-atoms": "^1.1.1",
        "function-bind": "^1.1.2",
        "get-proto": "^1.0.1",
        "gopd": "^1.2.0",
        "has-symbols": "^1.1.0",
        "hasown": "^2.0.2",
        "math-intrinsics": "^1.1.0"
      },
      "engines": {
        "node": ">= 0.4"
      },
      "funding": {
        "url": "https://github.com/sponsors/ljharb"
      }
    },
    "node_modules/get-proto": {
      "version": "1.0.1",
      "resolved": "https://r.cnpmjs.org/get-proto/-/get-proto-1.0.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "dunder-proto": "^1.0.1",
        "es-object-atoms": "^1.0.0"
      },
      "engines": {
        "node": ">= 0.4"
      }
    },
    "node_modules/gopd": {
      "version": "1.2.0",
      "resolved": "https://r.cnpmjs.org/gopd/-/gopd-1.2.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">= 0.4"
      },
      "funding": {
        "url": "https://github.com/sponsors/ljharb"
      }
    },
    "node_modules/has-symbols": {
      "version": "1.1.0",
      "resolved": "https://r.cnpmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">= 0.4"
      },
      "funding": {
        "url": "https://github.com/sponsors/ljharb"
      }
    },
    "node_modules/has-tostringtag": {
      "version": "1.0.2",
      "resolved": "https://r.cnpmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "has-symbols": "^1.0.3"
      },
      "engines": {
        "node": ">= 0.4"
      },
      "funding": {
        "url": "https://github.com/sponsors/ljharb"
      }
    },
    "node_modules/hasown": {
      "version": "2.0.2",
      "resolved": "https://r.cnpmjs.org/hasown/-/hasown-2.0.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "function-bind": "^1.1.2"
      },
      "engines": {
        "node": ">= 0.4"
      }
    },
    "node_modules/htmlparser2": {
      "version": "10.1.0",
      "resolved": "https://r.cnpmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "funding": [
        "https://github.com/fb55/htmlparser2?sponsor=1",
        {
          "type": "github",
          "url": "https://github.com/sponsors/fb55"
        }
      ],
      "license": "MIT",
      "dependencies": {
        "domelementtype": "^2.3.0",
        "domhandler": "^5.0.3",
        "domutils": "^3.2.2",
        "entities": "^7.0.1"
      }
    },
    "node_modules/htmlparser2/node_modules/entities": {
      "version": "7.0.1",
      "resolved": "https://r.cnpmjs.org/entities/-/entities-7.0.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-2-Clause",
      "engines": {
        "node": ">=0.12"
      },
      "funding": {
        "url": "https://github.com/fb55/entities?sponsor=1"
      }
    },
    "node_modules/iconv-lite": {
      "version": "0.6.3",
      "resolved": "https://r2.cnpmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "safer-buffer": ">= 2.1.2 < 3.0.0"
      },
      "engines": {
        "node": ">=0.10.0"
      }
    },
    "node_modules/math-intrinsics": {
      "version": "1.1.0",
      "resolved": "https://r.cnpmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">= 0.4"
      }
    },
    "node_modules/mime-db": {
      "version": "1.52.0",
      "resolved": "https://r.cnpmjs.org/mime-db/-/mime-db-1.52.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">= 0.6"
      }
    },
    "node_modules/mime-types": {
      "version": "2.1.35",
      "resolved": "https://r.cnpmjs.org/mime-types/-/mime-types-2.1.35.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "mime-db": "1.52.0"
      },
      "engines": {
        "node": ">= 0.6"
      }
    },
    "node_modules/nth-check": {
      "version": "2.1.1",
      "resolved": "https://r.cnpmjs.org/nth-check/-/nth-check-2.1.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-2-Clause",
      "dependencies": {
        "boolbase": "^1.0.0"
      },
      "funding": {
        "url": "https://github.com/fb55/nth-check?sponsor=1"
      }
    },
    "node_modules/parse5": {
      "version": "7.3.0",
      "resolved": "https://r.cnpmjs.org/parse5/-/parse5-7.3.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "entities": "^6.0.0"
      },
      "funding": {
        "url": "https://github.com/inikulin/parse5?sponsor=1"
      }
    },
    "node_modules/parse5-htmlparser2-tree-adapter": {
      "version": "7.1.0",
      "resolved": "https://r.cnpmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "domhandler": "^5.0.3",
        "parse5": "^7.0.0"
      },
      "funding": {
        "url": "https://github.com/inikulin/parse5?sponsor=1"
      }
    },
    "node_modules/parse5-parser-stream": {
      "version": "7.1.2",
      "resolved": "https://r.cnpmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "parse5": "^7.0.0"
      },
      "funding": {
        "url": "https://github.com/inikulin/parse5?sponsor=1"
      }
    },
    "node_modules/parse5/node_modules/entities": {
      "version": "6.0.1",
      "resolved": "https://r.cnpmjs.org/entities/-/entities-6.0.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-2-Clause",
      "engines": {
        "node": ">=0.12"
      },
      "funding": {
        "url": "https://github.com/fb55/entities?sponsor=1"
      }
    },
    "node_modules/proxy-from-env": {
      "version": "1.1.0",
      "resolved": "https://r2.cnpmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/safer-buffer": {
      "version": "2.1.2",
      "resolved": "https://r2.cnpmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/undici": {
      "version": "7.22.0",
      "resolved": "https://r.cnpmjs.org/undici/-/undici-7.22.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">=20.18.1"
      }
    },
    "node_modules/whatwg-encoding": {
      "version": "3.1.1",
      "resolved": "https://r.cnpmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz",
      "integrity": [REDACTED_SECRET],
      "deprecated": "Use @exodus/bytes instead for a more spec-conformant and faster implementation",
      "license": "MIT",
      "dependencies": {
        "iconv-lite": "0.6.3"
      },
      "engines": {
        "node": ">=18"
      }
    },
    "node_modules/whatwg-mimetype": {
      "version": "4.0.0",
      "resolved": "https://r.cnpmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">=18"
      }
    }
  }
}


path: package.json
content: {
  "name": "baidu-search",
  "version": "1.0.0",
  "description": "",
  "main": "baidusearch.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "axios": "^1.13.5",
    "cheerio": "^1.2.0",
    "commander": "^14.0.3"
  }
}


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: suspicious | SkillSpector: clean (LOW)