> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# Make a WeChat RSS feed from article listings and move an existing subscription

> Publish saved titles, URLs and excerpts, then verify new entries before switching your reader.

To follow new WeChat articles in a reader, generate `wechat.xml` from the titles, links and available summaries that `wechat_mp.v2.fetch_account_articles` returns in the account's article list. Publish `wechat.xml` at an HTTPS address the reader can reach and subscribe to that address. Each refresh costs only the list pages you actually request. To show more article text in the reader, use the [body excerpt RSS workflow](/guides/wechat-to-rss) for selected articles.

## Generate a listing snapshot for one account

1. Call `wechat_mp.v2.fetch_account_articles` with a confirmed `username` and `raw:false`, following [incremental article checks](/guides/wechat-incremental-articles).
2. Keep the successful scan's `state.json` and `coverage.json`, and check the account, the pages read and the stop reason in `coverage.json`.
3. For a migration trial, select two older articles and one current article and record each article's `app_msg_id` and `idx`.
4. For scheduled updates, start each check on page one and follow that run's cursor within your page limit.

If a scan fails, keep the published feed unchanged and update the feed after the next successful scan.

When the team only wants to see what was published today, a title, a source link and the available list summary are enough for a feed item. For example, a reader clicks the feed item “Installation manual update” and opens the original WeChat post. If readers need a body excerpt inside the reader, use the [article-excerpt workflow](/guides/wechat-to-rss) for the selected articles.

## Turn selected articles into feed input

1. Save `make_feed.py` from the [two-feed guide](/guides/trendradar-social-feeds). `make_feed.py` reads a JSON file with `items`.
2. Save the adapter below as `wechat_feed_input.py`. `wechat_feed_input.py` reads the article keys you choose from the saved `state.json` and writes the `items` input for `make_feed.py`.
3. Run `wechat_feed_input.py` with the saved state file, the feed homepage's HTTPS URL and the article keys to publish:

```bash
python3 wechat_feed_input.py state.json https://feeds.example.com/ 11801:1 11802:1 11803:1 > wechat-items.json &&
python3 make_feed.py wechat-items.json wechat.xml
```

```python
import json
import sys
from pathlib import Path
from urllib.parse import urlsplit

state_path, homepage, *selected = sys.argv[1:]
if not selected or len(set(selected)) != len(selected):
    raise SystemExit("Supply one or more distinct app_msg_id:idx keys")
state = json.loads(Path(state_path).read_text(encoding="utf-8"))
account = state["username"]
articles = {f"{row['app_msg_id']}:{row['idx']}": row for row in state["articles"]}
items = []
for key in selected:
    if key not in articles:
        raise SystemExit(f"Article key unavailable: {key}")
    row = articles[key]
    link = urlsplit(row["url"])
    if link.scheme != "https" or link.hostname != "mp.weixin.qq.com" or link.username:
        raise SystemExit(f"Verify the source link for {key}")
    items.append({
        "id": f"wechat:{account}:{key}",
        "title": row["title"],
        "url": row["url"],
        "excerpt": row.get("digest") or "",
    })
print(json.dumps({
    "title": f"WeChat: {account}",
    "link": homepage,
    "description": "Selected article listing excerpts",
    "items": items,
}, ensure_ascii=True, indent=2))
```

`wechat_feed_input.py` passes the saved `digest` when the article has one, and omits publication times. To filter by date, verify the unit and timezone of `create_time`, then set the generator's `published_at` field. Keep the collection time in your scan records.

## Trial an existing subscription migration

1. Keep a copy of the old OPML and of the old feed XML if available.
2. Compare the `link` and `guid` of two articles that appear in both the old feed and `wechat.xml`. `wechat_feed_input.py` creates a stable ID from the account and the article key. If your reader relies on the old IDs, replace the new input item's `id` with the old `guid` after verifying that both point to the same original article, and keep the ID mapping for later runs.
3. Keep URLs that contain private access tokens in local records only.
4. Serve `wechat.xml` at an HTTPS URL you control and add one test subscription in your reader. If the reader supports OPML import, replace `xmlUrl` in the sample OPML below.

The OPML file carries subscription URLs only; whether read state migrates depends on the reader.

```xml
<opml version="2.0">
  <head><title>WeChat trial subscription</title></head>
  <body>
    <outline text="WeChat research" type="rss"
             xmlUrl="https://feeds.example.com/wechat.xml" />
  </body>
</opml>
```

### What should you see in a three-article trial?

| What happens after you publish the feed                                    | What to check                                                                                                                                                                                         |
| -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Two older articles and one current article are available                   | Open a link and confirm the link leads to the original WeChat article. A summary-only item needs its summary and original link.                                                                       |
| The same three articles reappear as unread after regenerating the feed     | Compare `guid` and `link` across both versions of the XML at the same subscription URL. If the XML has not changed, check whether the reader treats the old and trial URLs as separate subscriptions. |
| You add one article and the new article is the only new item after refresh | Switch subscriptions. To preserve history or read state, check what your reader can migrate and back up before disabling the old feed.                                                                |

Checking one page for each of five accounts daily for 30 days uses 150 list requests. Extra pages and article details are counted separately. See [BeatAPI pricing](https://beatapi.io/pricing).

[RSS specification](https://www.rssboard.org/rss-specification) · [OPML specification](https://opml.org/spec2.opml)