Expand description
§联系方式提取模块
从 HTML 页面中提取邮箱、电话、地址、社交媒体链接等联系信息。 改编自 halldyll-parser 的联系方式提取逻辑。
Structs§
- Address
- 物理地址
- Contact
Info - 统一联系方式容器
- Coordinates
- 地理坐标
- 邮箱地址
- Phone
- 电话号码
- Social
Link - 社交媒体链接
Enums§
- Email
Source - 邮箱来源
- Phone
Type - 电话类型
- Social
Platform - 社交平台枚举
Functions§
- detect_
phone_ type - 检测电话号码类型
- detect_
social_ platform - 检测社交媒体平台类型
- extract_
address_ components - 从原始文本中提取地址组成部分
- extract_
addresses - 从 HTML 文档中提取地址信息
- extract_
business_ name - 从 HTML 文档中提取企业/组织名称
- extract_
contact_ info - 从 HTML 文档中提取所有联系信息
- extract_
email_ label - 提取邮箱附近的标签文本
- extract_
emails - 从 HTML 文档中提取邮箱地址
- extract_
phone_ label - 提取电话号码附近的标签文本
- extract_
phones - 从 HTML 文档中提取电话号码
- extract_
social_ links - 从 HTML 文档中提取社交媒体链接
- extract_
social_ username - 从社交 URL 中提取用户名
- extract_
structured_ address - 从结构化数据(JSON-LD / Microdata)中提取地址
- find_
contact_ page - 查找页面中的联系方式页面链接
- get_
emails - 直接获取所有邮箱地址字符串
- get_
phones - 直接获取所有电话号码字符串
- get_
social_ links - 直接获取所有社交链接 URL 字符串
- has_
contact_ info - 检查 HTML 文档中是否包含任何联系信息
- is_
valid_ email - 验证邮箱地址有效性(基础格式检查 + 排除常见无效地址)