wechat2rss Documentation

repository·master·Indexed 23 days ago

https://github.com/ttttmr/wechat2rss

A service providing stable RSS feeds for WeChat Official Accounts, designed to index new articles within 24 hours. Includes documentation for using the public service, deploying private instances via Docker, managing subscriptions and WeChat accounts through a REST API, and configuring the service using environment variables for security, content output, and notifications.

Tokens
8K
Snippets
18
Records
51
Agent score
80%

What's inside wechat2rss

  1. Access WeChat Official Account RSS feeds

    master

    You can access the public WeChat Official Account RSS service at https://wechat2rss.xlab.app. The service currently supports over 300 public accounts. To find specific feeds, you can browse the curated list or the full list of all supported accounts via the following links:

    If you want to request a new account to be added, you can submit a recommendation via GitHub Issues, provided it meets the inclusion standards.

  2. Manage WeChat account status and risk control (风控)

    master

    Account status is tracked by two metrics:

    • Login Status (登录是否正常): If this is abnormal, you must re-add and log in again (do not delete the account).
    • Risk Control Status (是否在风控中): If an account is under risk control, it cannot be used to crawl data. Risk control usually resolves automatically within a few hours to a few days. You can also configure alerts to be notified of these issues.

    How to manually resolve Risk Control (手动解除风控)

    If an account is flagged, follow these steps:

    1. Open the Article Collections (文章收藏) page in WeChat Reading.
    2. If prompted, complete the authorization.
    3. In the collection list, click on the Name of the Official Account (Note: Click the name, not the article title).
    4. This will enter the official account's Article List Page, which displays all articles and update info. Follow the on-screen prompts to complete the process.
    TIP

    If you do not see 文章收藏, repeat the WeChat Reading authorization steps. [!TIP] Using common WeChat IDs is less likely to trigger risk control. [!TIP] To make the account immediately available after resolving risk control, click the 刷新风控 (Refresh Risk Control) button on the account page, though this is not recommended.

  3. Understand device activation limits

    master

    Activation codes can be reused, but they are strictly limited to a single bound device and a single container instance.

    Activation data is stored in the res.db database located within the data directory (which corresponds to the /wechat2rss directory inside the container).

    Warning: Deploying across multiple machines or running multiple instances on a single machine will trigger activation limits.

  4. Understand WeChat risk control (风控) behavior

    master

    When the WeChat account used for scraping is flagged by WeChat's risk control system, the service implements an exponential backoff strategy to reduce request frequency and avoid further bans.

    Backoff Logic:

    • The initial wait time is 15 minutes.
    • If the account is still restricted after the wait, the time doubles: 30 minutes, 60 minutes, 120 minutes, etc.
    • The maximum wait time is capped at 6 hours.
    • Once the account is successfully unblocked, the wait time resets to 15 minutes for the next trigger.

    Note: If you see subscriptions displaying as numbers instead of names, it is likely because the account is under risk control and failed to crawl the necessary data. Refer to the manual unblocking guide for resolution.

  5. Required configuration for first startup

    master

    The following environment variables must be provided during the very first deployment to initialize the service:

    • LIC_EMAIL: Your authorization email (all lowercase).
    • LIC_CODE: Your authorization activation code.
    • RSS_HOST: The address where the generated RSS feeds will be hosted. This must include the port number. Note that this only controls the link addresses within the generated content; it does not affect the actual address used to access the backend or the service's listening port.
    LIC_EMAIL=i@xlab.app
    LIC_CODE=f2aa6823-b2a6-4670-9acd-0e26d1204a43
    RSS_HOST=192.168.1.1:8080
  6. Configure Wechat2RSS to use a Custom Domain for Proxying

    master

    To use a custom domain (e.g., rss.example.com) for your proxy, follow these steps:

    1. Configure Cloudflare Worker Routes: In the Cloudflare dashboard, navigate to Settings -> Triggers -> Routes and add the following routes to ensure the worker handles the proxy requests:

      • rss.example.com/img-proxy/*
      • rss.example.com/video-proxy/*
      • rss.example.com/link-proxy/*
    2. Configure Wechat2RSS Environment Variables: Set the RSS_PROXY_PREFIX to your custom domain and ensure RSS_PROXY_SECRET matches the secret defined in your worker script.

    RSS_PROXY_SECRET=abcd1234
    RSS_PROXY_PREFIX=https://rss.example.com
  7. Deploy to Railway

    master

    Use the Railway one-click deployment button to deploy the service. This method includes automatic updates.

    1. Click the Deploy on Railway button.
    2. In the configuration page, enter your email and activation code.
    3. Once deployed, Railway will automatically assign a domain like xxx.railway.app.

    View Logs

    1. Go to Deployments and click View Logs.
    2. Alternatively, check the Deploy Logs page.

    Upgrade

    Updates are automatic. To trigger a manual check, go to Settings -> Source -> Upstream Repo and click Check for updates.

  8. Browse the complete WeChat Official Account RSS list

    master
    The wechat2rss project provides a curated list of WeChat Official Accounts that have been converted into RSS feeds. These are categorized into sections such as 'Development' (开发), 'Other' (其他), and 'User Submissions' (用户提交). Each entry provides a direct link to the generated XML feed.
  9. Authorize WeChat Reading and log in WeChat accounts

    master

    The service uses WeChat Reading to fetch official account information. Follow these steps to set up authentication:

    1. Register WeChat Reading Authorization

    1. Install and log in to WeChat Reading using your WeChat account.
    2. Open any official account article in WeChat.
    3. Click Share and select Read in WeChat Reading (在微信读书中阅读).
    4. Follow the prompts to complete the authorization.

    2. Log in to WeChat in the service

    1. Navigate to the 微信账号 (WeChat Accounts) section in the service.
    2. Click 添加账号 (Add Account).
    3. Scan the QR code with your phone to log in.
    4. If your phone prompts for remote login verification, complete the submission on the web page.
  10. Retrieve the service password (Token)

    master

    The service password is the Token found in the service logs. If you are using Docker Compose, you can retrieve it by running the following command:

    docker compose logs

    Look for the following pattern in the output:

    "--- CONIF ---"
    "Addr: https://xxxxx"
    "Token: xxxx" // This is your password
    "--- CONIF ---"

    If you cannot find it, try restarting the service. To change the password, update the RSS_TOKEN in the service configuration and click save.