This commit is contained in:
manchuwork
2025-11-09 08:37:48 +08:00
parent ebe60b3ae6
commit ff578beba3
2 changed files with 10635 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
// @author You
// @match https://www.qcc.com/firm/*
// @match https://aiqicha.baidu.com/company_detail_*
// @match https://shiming.gsxt.gov.cn/*
// @grant none
// ==/UserScript==
@@ -680,6 +681,129 @@
}
}
// 国家企业信用信息公示系统解析类
// 国家企业信用信息公示系统解析类
class NationalCreditParser {
constructor() {
this.infoContainer = null;
}
// 初始化信息容器
initContainer() {
this.infoContainer = document.querySelector("#primaryInfo .overview");
if (!this.infoContainer) {
alert("未找到企业信息容器");
return false;
}
return true;
}
// 获取优化后的值
getOptimizedValue(title) {
const dls = Array.from(this.infoContainer.querySelectorAll("dl"));
for (const dl of dls) {
const dt = dl.querySelector("dt");
if (dt && ToolUtils.cleanText(dt.textContent).includes(title)) {
const dd = dl.querySelector("dd");
if (dd) {
return ToolUtils.cleanText(dd.textContent);
}
}
}
return null;
}
// 获取企业名称
getCompanyName() {
return this.getOptimizedValue("企业名称");
}
// 获取统一社会信用代码
getUnifiedSocialCreditCode() {
return this.getOptimizedValue("统一社会信用代码");
}
// 获取法定代表人
getLegalRepresentative() {
return this.getOptimizedValue("法定代表人");
}
// 获取成立日期
getEstablishmentDate() {
return this.getOptimizedValue("成立日期");
}
// 获取注册资本
getRegisteredCapital() {
return this.getOptimizedValue("注册资本");
}
// 获取企业类型
getEnterpriseType() {
return this.getOptimizedValue("类型");
}
// 获取核准日期
getApprovalDate() {
return this.getOptimizedValue("核准日期");
}
// 获取登记机关
getRegistrationAuthority() {
return this.getOptimizedValue("登记机关");
}
// 获取经营状态
getBusinessStatus() {
return this.getOptimizedValue("登记状态");
}
// 获取住所/注册地址
getRegisteredAddress() {
return this.getOptimizedValue("住所");
}
// 获取经营范围
getBusinessScope() {
const dls = Array.from(this.infoContainer.querySelectorAll("dl"));
for (const dl of dls) {
const dt = dl.querySelector("dt");
if (dt && ToolUtils.cleanText(dt.textContent).includes("经营范围")) {
const dd = dl.querySelector("dd");
if (dd) {
// For business scope, we want to preserve more formatting
return dd.textContent.trim().replace(/[\r\n\t]+/g, " ").replace(/\s+/g, " ");
}
}
}
return null;
}
// 解析公司信息主方法
parseCompanyInfo() {
if (!this.initContainer()) return;
const companyData = {
企业名称: this.getCompanyName(),
统一社会信用代码: this.getUnifiedSocialCreditCode(),
法定代表人: this.getLegalRepresentative(),
经营状态: this.getBusinessStatus(),
成立日期: this.getEstablishmentDate(),
注册资本: this.getRegisteredCapital(),
企业类型: this.getEnterpriseType(),
核准日期: this.getApprovalDate(),
登记机关: this.getRegistrationAuthority(),
注册地址: this.getRegisteredAddress(),
经营范围: this.getBusinessScope(),
};
ToolUtils.showResult(companyData);
}
}
// end国家企业信用信息公示系统解析类
// 创建按钮容器
function createButtonContainer() {
const container = document.createElement("div");
@@ -812,6 +936,8 @@
parser = new AiQiChaParser();
} else if (window.location.host.includes("qcc.com")) {
parser = new QCCParser();
} else if (window.location.host.includes("gsxt.gov.cn")) {
parser = new NationalCreditParser();
} else {
alert("不支持的网站");
return;

10509
国家信用.html Normal file

File diff suppressed because one or more lines are too long