扫描网站内容以识别SEO缺口,分析元标签、技术因素和关键词使用,并提供竞争对手对比洞察。
SEO审计 内容和网站综合SEO分析.是一项面向实际任务的技能,主要用于QQ快速审计检查清单.;On-Page SEO.技术SEO. 相关质量.技术SEO命令.;
它将相关步骤、工具调用和结果整理方式集中到统一流程中,帮助使用者更快完成目标并减少重复操作。使用时应结合输入条件选择合适的执行方式,核对必要参数、依赖环境与输出内容,并按原始要求处理异常情况。该技能适合需要稳定复用相关能力的场景,可作为自动化工作流的一部分,也便于后续检查、调整和扩展。从功能定位来看,该技能强调把分散的操作要求整理成清晰、可复用的处理流程,使用户能够围绕既定目标快速准备输入、选择执行方式并获得结构化结果。
实际使用前应先确认任务范围、数据来源、运行环境、必要权限和关键参数,再依据技能说明逐步执行;若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;涉及批量任务时,还应保存进度,避免中断后重复操作。
面向内容与网站的全面 SEO 分析。
- [ ] 标题标签(title tag,50–60 个字符,关键词靠前)
- [ ] 元描述(meta description,150–160 个字符,具有吸引力)
- [ ] H1 标签(每页仅一个,包含目标关键词)
- [ ] H2–H6 层级结构(逻辑清晰、层次合理)
- [ ] 图片 alt 文本(描述准确,与关键词相关)
- [ ] 站内链接(每页至少 3–5 个)
- [ ] URL 结构(简短、具描述性、使用英文连字符分隔)
- [ ] 规范标签(canonical tags,防止重复内容)
- [ ] 页面加载速度(<3 秒)
- [ ] 移动端适配(响应式设计)
- [ ] HTTPS(SSL 证书有效)
- [ ] XML 站点地图(已提交至 Search Console)
- [ ] robots.txt(配置正确)
- [ ] 结构化数据(Schema.org 标记)
- [ ] 核心网页指标(Core Web Vitals:LCP、FID、CLS)
- [ ] 关键词出现在前 100 个字内
- [ ] 内容长度匹配用户搜索意图
- [ ] 无关键词堆砌(关键词密度 <2%)
- [ ] 可读性强(Flesch-Kincaid 可读性评分)
- [ ] 提供独特价值(非重复内容)
- [ ] 内容保持更新(定期刷新)
# 使用 PageSpeed Insights API
curl "https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=https://example.com&strategy=mobile"
# 本地使用 Lighthouse
npx lighthouse https://example.com --view
curl https://example.com/robots.txt
curl https://example.com/sitemap.xml | xmllint --format -
openssl s_client -connect example.com:443 -servername example.com 2>/dev/null | openssl x509 -noout -dates
# Google 移动端友好性测试 API
curl "https://searchconsole.googleapis.com/v1/urlTestingTools/mobileFriendlyTest:run?key=YOUR_API_KEY"
-H "Content-Type: application/json"
-d '{"url":"https://example.com"}'
import re
from collections import Counter
def keyword_density(text, keyword):
words = re.findall(r'\b\w+\b', text.lower())
keyword_count = text.lower().count(keyword.lower())
density = (keyword_count / len(words)) * 100
return {
"keyword": keyword,
"count": keyword_count,
"total_words": len(words),
"density": f"{density:.2f}%"
}
# 目标密度:1–2%
import textstat
text = "Your content here..."
flesch = textstat.flesch_reading_ease(text)
# 90–100:非常容易阅读
# 60–70:标准难度
# 0–30:极难阅读
grade = textstat.flesch_kincaid_grade(text)
# 面向普通受众的目标年级:8–9 年级
from bs4 import BeautifulSoup
def analyze_headings(html):
soup = BeautifulSoup(html, 'html.parser')
headings = {
'h1': soup.find_all('h1'),
'h2': soup.find_all('h2'),
'h3': soup.find_all('h3'),
}
issues = []
if len(headings['h1']) == 0:
issues.append("缺失 H1 标签")
elif len(headings['h1']) > 1:
issues.append("存在多个 H1 标签(应仅有一个)")
return {
"counts": {k: len(v) for k, v in headings.items()},
"issues": issues
}
from bs4 import BeautifulSoup
import requests
def audit_meta_tags(url):
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')
title = soup.find('title')
description = soup.find('meta', attrs={'name': 'description'})
keywords = soup.find('meta', attrs={'name': 'keywords'})
issues = []
if not title or len(title.text) < 30:
issues.append("标题过短或缺失")
elif len(title.text) > 60:
issues.append("标题过长(>60 字符)")
if not description:
issues.append("缺失 meta description")
elif len(description.get('content', '')) < 120:
issues.append("meta description 过短")
elif len(description.get('content', '')) > 160:
issues.append("meta description 过长")
return {
"title": title.text if title else None,
"description": description.get('content') if description else None,
"issues": issues
}
# 使用 Google Rich Results Test
curl "https://searchconsole.googleapis.com/v1/urlTestingTools/richResultsTest:run"
-H "Authorization: Bearer YOUR_TOKEN"
-H "Content-Type: application/json"
-d '{"url":"https://example.com"}'
// Article
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Title",
"author": {"@type": "Person", "name": "Author"},
"datePublished": "2026-01-01"
}
// Local Business
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Business Name",
"address": {"@type": "PostalAddress", "streetAddress": "123 Main"},
"telephone": "+1-555-555-5555"
}
// FAQ
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "Question?",
"acceptedAnswer": {"@type": "Answer", "text": "Answer"}
}]
}
import requests
from bs4 import BeautifulSoup
def compare_seo(target_url, competitor_url):
def get_metrics(url):
r = requests.get(url)
soup = BeautifulSoup(r.text, 'html.parser')
return {
"title_len": len(soup.find('title').text) if soup.find('title') else 0,
"h1_count": len(soup.find_all('h1')),
"h2_count": len(soup.find_all('h2')),
"word_count": len(soup.get_text().split()),
"images": len(soup.find_all('img')),
"images_no_alt": len([i for i in soup.find_all('img') if not i.get('alt')])
}
return {
"target": get_metrics(target_url),
"competitor": get_metrics(competitor_url)
}
# SEO 审计报告
## 概要
- **得分:** X/100
- **严重问题:** X
- **警告项:** X
- **通过项:** X
## 严重问题
1. [问题描述]
- 影响程度:[高/中/低]
- 修复建议:[推荐操作]
## 技术型 SEO
| 因素 | 状态 | 备注 |
|--------------|------|------------------|
| 页面速度 | ⚠️ | 加载耗时 4.2 秒 |
| 移动端适配 | ✅ | 响应式设计 |
| HTTPS | ✅ | SSL 证书有效 |
| 站点地图 | ✅ | 已提交 |
## 页面内 SEO
| 因素 | 状态 | 备注 |
|--------------|------|------------------|
| 标题 | ✅ | 55 个字符 |
| Meta 描述 | ⚠️ | 描述过短 |
| H1 标签 | ✅ | 已存在 |
| 图片 | ⚠️ | 3 张图片缺失 alt |
## 优化建议
1. [优先级 1]
2. [优先级 2]
3. [优先级 3]
相关专题
热门下载
相关下载
精品课程
共60课时 | 14.8万人学习
共5课时 | 1.1万人学习
共116课时 | 27.9万人学习