wx_channels_download

repository·main·Indexed 27 days ago

https://github.com/ltaoo/wx_channels_download

A lightweight WeChat Channels video downloader for macOS and Windows. It integrates with the WeChat PC client to enable direct video downloads in various qualities and provides tools to parse sharing links. The project includes a CLI for downloading and decrypting videos, a Cloudflare Workers implementation for an Official Account API, and integration with the Gopeed download tool.

Tokens
27.2K
Snippets
71
Records
210
Agent score
94%

What's inside wx_channels_download

  1. Quickstart with 微信视频号下载器

    main

    The wx_channels_download project (微信视频号下载器) is a tool designed for one-click downloading of WeChat Channels content. It is cross-platform (supporting macOS and Windows), lightweight (approximately 8MB), and easy to use via direct interaction on the video page. It also provides WeChat Channels data interfaces for developers to implement custom functionality.

    To get started, navigate to the Quickstart guide.

  2. Build Gopeed for Desktop (Windows, macOS, Linux)

    main

    Building for desktop requires a configured Flutter environment and a properly set up cgo environment.

    Windows

    go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/windows/libgopeed.dll github.com/GopeedLab/gopeed/bind/desktop
    cd ui/flutter
    flutter build windows

    macOS

    go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/macos/Frameworks/libgopeed.dylib github.com/GopeedLab/gopeed/bind/desktop
    cd ui/flutter
    flutter build macos

    Linux

    go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/linux/bundle/lib/libgopeed.so github.com/GopeedLab/gopeed/bind/desktop
    cd ui/flutter
    flutter build linux
  3. Use the downloader with Clash or Sing-box

    main
    If you are using proxy software like Clash or Sing-box, you can prevent the downloader from setting a system-wide proxy and instead route traffic through your proxy software by setting proxy.system=false in your config.yaml. This allows you to manage traffic forwarding via Clash manually.
  4. Compile Gopeed for Desktop

    main

    To build the desktop version, you must configure your environment according to the official Flutter desktop documentation and ensure a cgo environment is ready.

    Windows:

    go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/windows/libgopeed.dll github.com/GopeedLab/gopeed/bind/desktop
    cd ui/flutter
    flutter build windows

    macOS:

    go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/macos/Frameworks/libgopeed.dylib github.com/GopeedLab/gopeed/bind/desktop
    cd ui/flutter
    flutter build macos

    Linux:

    go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/linux/bundle/lib/libgopeed.so github.com/GopeedLab/gopeed/bind/desktop
    cd ui/flutter
    flutter build linux
  5. Build Gopeed for Web

    main

    To build the web version, use the following commands to build the Flutter web assets and then compile the Go backend:

    cd ui/flutter
    flutter build web
    cd ../../
    rm -rf cmd/web/dist
    cp -r ui/flutter/build/web cmd/web/dist
    go build -tags nosqlite,web -ldflags="-s -w" -o bin/ github.com/GopeedLab/gopeed/cmd/web
  6. Build Gopeed for Desktop (Windows, macOS, Linux)

    main

    To build the desktop version, you must first configure your environment according to the Flutter desktop platform integration guide and ensure cgo is correctly set up. The build process involves building the Go backend as a shared library and then building the Flutter UI.

    # Windows
    go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/windows/libgopeed.dll github.com/GopeedLab/gopeed/bind/desktop
    cd ui/flutter
    flutter build windows
    
    # macOS
    go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/macos/Frameworks/libgopeed.dylib github.com/GopeedLab/gopeed/bind/desktop
    cd ui/flutter
    flutter build macos
    
    # Linux
    go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/linux/bundle/lib/libgopeed.so github.com/GopeedLab/gopeed/bind/desktop
    cd ui/flutter
    flutter build linux
  7. Build the WeChat Video Download Docker image locally

    main

    Local builds are required if you need to modify the Dockerfile, debug image contents, or if the official image is unavailable. You must provide a WeChatLinux_arm64.deb file.

    Build with custom parameters:

    • WECHAT_DEB: Path to the .deb file.
    • IMAGE: Desired image name/tag.
    • CONFIG_FILE: Path to a custom config.yaml.
    • GLOBAL_SCRIPT: Path to a custom global.js script.
    WECHAT_DEB=/path/to/WeChatLinux_arm64.deb \
    IMAGE=wx_video_download:v260607 \
    bash scripts/build-webtop-image.sh
  8. Download WeChat Channels Live Streams

    main

    To download a live stream from a WeChat Channels page, ensure you have ffmpeg installed on your system.

    1. Navigate to the live stream page.
    2. Locate and click the 「下载图标」 (Download Icon) button in the top right corner of the page.
    3. The interface will output an ffmpeg command in the terminal/console.
    4. Copy the generated command and paste it into any terminal to begin the download process.
  9. Certificate application rules and requirements

    main

    When configuring custom certificates, follow these rules to ensure they are applied correctly:

    • Activation Logic: The custom certificate and private key are used only if both are configured and the files exist and are readable. If either is missing or unreadable, the system falls back to the built-in certificate.
    • Pathing: It is highly recommended to use absolute paths. If using relative paths, ensure they are relative to the program's working directory.
    • Key Matching: The certificate and private key must be a matching pair.
    • System Integration: The cert.name is used to detect if the certificate is already installed in the system certificate store for identification and uninstallation.
    • Permissions: On Windows, installing or uninstalling certificates requires administrator privileges.
  10. Configure MP3 download method

    main

    Starting from version 251226, downloading MP3 files requires either a local installation of ffmpeg or a configuration change to perform conversion in the frontend.

    To avoid installing ffmpeg locally, set download.frontend to true in your configuration file. This enables frontend-based conversion.