Skip to content

v0.0.3

Choose a tag to compare

@huanjuedadehen huanjuedadehen released this 20 Apr 03:41
· 37 commits to main since this release

✨ 新增

  • 账号类型识别 — ArticleResult 新增 mp_account_type 字段,自动从页面中的 new_service_type 提取(0/1 → 订阅号,2 → 服务号)

  • AccountType 枚举 — 从包根导出 AccountType(继承自 str 的 Enum),既可按枚举比较也可按中文字符串比较:

    from wechat_article_parser import parse, AccountType
    
    result = parse("https://mp.weixin.qq.com/s/xxxxx")
    if result.mp_account_type == AccountType.SERVICE:
        print("这是服务号")
    print(f"账号类型: {result.mp_account_type}")  # 订阅号 / 服务号