res-downloader

repository·master·Indexed 11 days ago

https://github.com/putyy/res-downloader

A cross-platform resource downloader built with Go and Wails. It uses a proxy-based sniffing mechanism to intercept and download media types including videos, audio, images, m3u8, and live streams from platforms such as WeChat, Douyin, Kuaishou, Xiaohongshu, Kugou Music, and QQ Music.

Tokens
7.2K
Snippets
20
Records
50
Agent score
96%

What's inside res-downloader

  1. Overview of res-downloader

    master

    res-downloader is a cross-platform resource downloading tool built using Go and Wails. It is designed to be simple and user-friendly, providing capabilities for sniffing and downloading various types of online resources.

    Key Features

    • Multi-platform Support: Works on Windows, macOS, and Linux.
    • Wide Resource Support: Handles video, audio, images, m3u8, and live streams.
    • Platform Compatibility: Supports resources from platforms like WeChat Video Accounts, WeChat Mini Programs, Douyin (TikTok), Kuaishou, Xiaohongshu, Kugou Music, and QQ Music.
    • Proxy Sniffing: Supports setting up proxies to capture and retrieve resources from restricted networks.
  2. How res-downloader works

    master
    The tool operates using a proxy-based network sniffing approach, similar to how Fiddler, Charles, or browser DevTools function. It intercepts network traffic, filters for usable resources, and provides a user-friendly interface for selecting and downloading them, significantly lowering the technical barrier compared to traditional debugging tools.
  3. Intercept specific resource types for batch downloading

    master
    To optimize the interception process, you can select specific resource types to capture. For example, if you only require video files, you can select the 'Video' type (multiple types can be selected simultaneously) to ensure the downloader only intercepts those specific assets for batch downloading.
  4. Configure application settings

    master

    The application includes various configuration options.

    Important: Always click '保存' (Save) after making changes to ensure settings are applied.

    For detailed information on any specific configuration item, hover your mouse over the '?' icon next to the setting to view its description.

  5. How to use res-downloader to capture resources

    master

    To correctly capture and download resources (videos, audio, images, etc.) from platforms like WeChat Video Accounts, Douyin, or web pages, follow these steps:

    1. Installation: During installation, you must allow the installation of the certificate file and grant network access permissions.
    2. Start Proxy: Open the software and click "启动代理" (Start Proxy) located at the top left of the home page.
    3. Select Resource Type: Choose the type of resource you want to capture (e.g., video, audio, image, m3u8, live stream). You can leave it as the default (All).
    4. Browse Resources: Open your target resource page (e.g., a video in a WeChat Mini Program or a website) in an external browser or app.
    5. View Results: Return to the res-downloader home page to see the captured resource list.
  6. Download installation files for res-downloader

    master

    Select the appropriate installation file based on your operating system and architecture:

    • Windows: Download files ending in .exe. For most modern systems, look for files containing win_amd64.exe or x64-installer.exe.
    • macOS: Download the .dmg file.
    • Linux: Download the executable or installation package corresponding to your specific Linux distribution.
  7. Install the certificate manually on macOS

    master

    If you encounter 'Not a private link' errors, the certificate is likely not installed correctly. For macOS (V3+ versions), you can install the certificate and mark it as trusted by running this command in the terminal. Follow the prompts to enter your password:

    sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /Users/$(whoami)/Library/Preferences/res-downloader/cert.crt && touch /Users/$(whoami)/Library/Preferences/res-downloader/install.lock && echo "安装完成"
  8. How to use res-downloader

    master

    Follow these steps to capture and download resources:

    1. Installation Requirements: During installation, you must agree to install the certificate files and allow network access.
    2. Launch the Software:
      • Windows: For the first use, right-click the application and select Run as Administrator.
      • Important: Before installing on Windows, close all security/antivirus software.
      • Mac: If the software fails to intercept traffic, please disable your firewall.
    3. Start Proxy: Click the “启动代理” (Start Proxy) button in the top-left corner of the application.
    4. Capture Resources: Open the source you want to capture (e.g., WeChat Video Accounts, web pages, mini-programs, etc.).
    5. View Resources: Return to the software's home page to see the list of captured resources.
  9. Enable Volar Take Over mode for better TypeScript support in .vue files

    master

    By default, TypeScript treats .vue imports as generic Vue components, which means you won't get full prop type validation when importing components into .ts files (e.g., when using manual h(...) calls).

    To enable Volar's Take Over mode and get actual prop types, follow these steps in VS Code:

    1. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
    2. Run Extensions: Show Built-in Extensions.
    3. Find the extension named TypeScript and JavaScript Language Features.
    4. Right-click it and select Disable (Workspace).
    5. Open the Command Palette again and run Developer: Reload Window to reload the VS Code window.

    This allows Volar to handle both Vue and TypeScript files directly, providing better type information for .vue imports.

  10. Intercept resources from WeChat Channels (视频号) and Web Browsers

    master

    Once the proxy is enabled, the software can intercept resources from various sources:

    • WeChat Channels (视频号): Open the Channels feature in WeChat, and the intercepted video/media resources will appear in the software's list.
    • Web Browsers: Open any website (e.g., https://www.baidu.com/) in a standard browser or a built-in browser within another app. The resources requested by the page will be captured.
    • Other Apps: The same interception method works for resources within Mini Programs (小程序), Official Accounts (公众号), Douyin (抖音), Xiaohongshu (小红书), QQ Music (QQ音乐), Kugou (酷狗), and similar applications.
  11. Install res-downloader on Linux

    master

    Installation methods vary depending on your distribution and file type:

    Ubuntu (using .deb package)

    Use apt to install the .deb file:

    sudo apt install res-downloader_3.0.2_linux_x64.deb

    Generic Linux (using executable binary)

    If you have a standalone executable, grant it execution permissions and run it with sudo:

    chmod +x ./res-downloader_3.0.2_linux_x64
    sudo ./res-downloader_3.0.2_linux_x64

    Note: Replace the filename in the commands above with the exact version you downloaded.

    sudo apt install res-downloader_3.0.2_linux_x64.deb
    
    chmod +x ./res-downloader_3.0.2_linux_x64
    sudo ./res-downloader_3.0.2_linux_x64
  12. Download intercepted resources to local storage

    master

    After resources have been intercepted and listed in the software, you can save them to your computer:

    1. Locate the specific video or resource you wish to save from the intercepted list.
    2. Click the 下载 (Download) button associated with that resource to save it to your local machine.