Skip to content

feat: extract URL from link messages (app_type=5)#17

Open
emmaelise34453-web wants to merge 1 commit into
huohuoer:mainfrom
emmaelise34453-web:main
Open

feat: extract URL from link messages (app_type=5)#17
emmaelise34453-web wants to merge 1 commit into
huohuoer:mainfrom
emmaelise34453-web:main

Conversation

@emmaelise34453-web

Copy link
Copy Markdown

What changed

Extract the <url> field from link messages (app_type=5) and include it in the formatted output.

Before

[链接] 如何用AI提升10倍效率

After

[链接] 如何用AI提升10倍效率
  https://mp.weixin.qq.com/s/wx7rLvP_W8-cXfb_jdIo9g

Why

WeChat group chats frequently share Official Account article links. Without the URL, users cannot:

  • Programmatically scrape article content
  • Build automated content collection workflows
  • Search for specific articles by URL

The XML payload already contains the <url> field — it was simply not being extracted.

Impact

  • Only affects messages with app_type == 5 (links)
  • Links without a URL field remain unchanged: [链接] title
  • No breaking changes to existing output format

Previously, link messages (including WeChat Official Account articles)
only showed the title, e.g. [链接] title.

Now the URL is also extracted from the XML <url> field and displayed:
  [链接] title
    https://mp.weixin.qq.com/s/...

This enables downstream workflows to automatically scrape article
content from group chat links.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant