Convert Figma logo to code with AI

BlueMatthew logoWechatExporter

Wechat Chat History Exporter 微信聊天记录导出备份程序

6,642
582
6,642
108

Top Related Projects

微信小助手的安装 / 更新工具。

🔥 使用cloudflare 搭建免费的 OpenAI api代理 ,解决网络无法访问问题。支持流式输出

💬 Unofficial WeChat client built with React, MobX and Electron.

:speech_balloon: A better WeChat on macOS and Linux. Built with Electron by Zhongyi Tong.

A plugin for Mac WeChat

微信小助手

Quick Overview

WechatExporter is an open-source tool designed to export chat history from WeChat on iOS devices. It allows users to backup and view their WeChat conversations, including text messages, images, and other media, in a more accessible format on their computer.

Pros

  • Enables users to export and backup WeChat chat history from iOS devices
  • Supports exporting various types of media, including images, voice messages, and videos
  • Provides a user-friendly interface for browsing and searching exported chat history
  • Regularly updated to maintain compatibility with newer iOS versions and WeChat updates

Cons

  • Only works with iOS devices, not Android or desktop versions of WeChat
  • Requires a jailbroken device or an iTunes backup for full functionality
  • May encounter issues with certain types of messages or media formats
  • Potential privacy concerns when exporting sensitive chat data

Getting Started

  1. Download the latest release of WechatExporter from the GitHub repository.
  2. Connect your iOS device to your computer and create an iTunes backup.
  3. Run the WechatExporter application and select the iTunes backup file.
  4. Choose the conversations you want to export and select the output format.
  5. Click "Export" and wait for the process to complete.
  6. Access your exported chat history in the specified output folder.

Note: For full functionality, including exporting voice messages and some types of media, a jailbroken iOS device may be required. Always ensure you have permission to export chat data and respect others' privacy.

Competitor Comparisons

微信小助手的安装 / 更新工具。

Pros of oh-my-wechat

  • Focuses on enhancing WeChat for Mac, offering features like preventing message revocation
  • Provides a command-line interface for easy installation and management
  • Regularly updated with new features and compatibility fixes

Cons of oh-my-wechat

  • Limited to macOS, not available for Windows or other platforms
  • Primarily enhances the WeChat application rather than exporting data
  • May require more technical knowledge to use effectively

Code Comparison

WechatExporter (C++):

void CWeChatExporter::ExportMessages(const std::wstring& userId)
{
    // Export logic for messages
}

oh-my-wechat (JavaScript):

function preventMessageRevocation(message) {
  // Logic to prevent message revocation
}

Summary

WechatExporter is a cross-platform tool focused on exporting WeChat data, while oh-my-wechat is a macOS-specific enhancement tool for the WeChat application. WechatExporter offers more comprehensive data extraction capabilities, whereas oh-my-wechat provides features to improve the user experience within WeChat. The choice between the two depends on the user's specific needs: data export or application enhancement.

🔥 使用cloudflare 搭建免费的 OpenAI api代理 ,解决网络无法访问问题。支持流式输出

Pros of chatgptProxyAPI

  • Focuses on providing a proxy API for ChatGPT, offering more specialized functionality
  • Likely more up-to-date with recent ChatGPT API changes and features
  • Potentially easier to integrate into existing projects that require ChatGPT functionality

Cons of chatgptProxyAPI

  • More limited in scope compared to WechatExporter's broader chat export capabilities
  • May require additional setup and configuration for API usage
  • Potentially less user-friendly for non-developers or those unfamiliar with API integration

Code Comparison

WechatExporter (C++):

void WechatExporter::exportMessages() {
    // Code for exporting Wechat messages
}

chatgptProxyAPI (Python):

@app.route('/chat', methods=['POST'])
def chat():
    # Code for handling ChatGPT API requests

The code snippets highlight the different focus areas of each project. WechatExporter deals with exporting messages from WeChat, while chatgptProxyAPI handles ChatGPT API requests. This reflects their distinct purposes and functionalities.

While both projects are related to chat or messaging systems, they serve different needs. WechatExporter is more suited for users looking to export and analyze WeChat data, while chatgptProxyAPI is better for developers integrating ChatGPT functionality into their applications.

💬 Unofficial WeChat client built with React, MobX and Electron.

Pros of weweChat

  • Cross-platform desktop application for WeChat, allowing use on multiple operating systems
  • Modern, user-friendly interface with customizable themes
  • Real-time messaging and file sharing capabilities

Cons of weweChat

  • Limited export functionality compared to WechatExporter
  • May not provide as comprehensive access to chat history and media
  • Potential security concerns with third-party WeChat clients

Code Comparison

WechatExporter (C++):

void WechatExporter::exportMessages(const std::string& chatId) {
    // Export logic for messages
}

weweChat (JavaScript):

async function sendMessage(message) {
  // Send message logic
}

WechatExporter focuses on exporting WeChat data, while weweChat is a full-fledged WeChat client. The code snippets reflect their different purposes, with WechatExporter handling data export and weweChat managing real-time messaging.

WechatExporter is more suitable for users who need to backup or analyze their WeChat data, while weweChat offers a alternative WeChat experience on desktop platforms. The choice between the two depends on whether the user prioritizes data extraction or a cross-platform messaging interface.

:speech_balloon: A better WeChat on macOS and Linux. Built with Electron by Zhongyi Tong.

Pros of electronic-wechat

  • Cross-platform desktop application for WeChat
  • Provides a native-like experience on macOS, Linux, and Windows
  • Offers additional features like message notifications and keyboard shortcuts

Cons of electronic-wechat

  • Limited functionality compared to the official WeChat client
  • May not support all WeChat features, such as video calls or certain mini-programs
  • Potential security concerns as it's a third-party application

Code Comparison

WechatExporter (C++):

bool CWeChatExporter::ExportMessage(const std::string& userId, const std::string& userName, const std::string& outputPath)
{
    // Implementation for exporting messages
}

electronic-wechat (JavaScript):

const {app, BrowserWindow} = require('electron');

function createWindow () {
  // Create the browser window.
  win = new BrowserWindow({width: 800, height: 600})
  win.loadURL('https://wx.qq.com/')
}

WechatExporter focuses on exporting WeChat data, while electronic-wechat aims to provide a desktop client for WeChat. The code snippets reflect their different purposes: WechatExporter handles message export functionality, whereas electronic-wechat sets up an Electron-based window to load the WeChat web interface.

A plugin for Mac WeChat

Pros of WeChatExtension-ForMac

  • Offers a wide range of features beyond exporting, including message recall prevention, auto-reply, and multi-account support
  • Provides a more integrated experience within the WeChat application
  • Actively maintained with frequent updates and bug fixes

Cons of WeChatExtension-ForMac

  • Limited to macOS, while WechatExporter supports both Windows and macOS
  • Requires more complex installation and setup process
  • May potentially violate WeChat's terms of service due to its extensive modifications

Code Comparison

WeChatExtension-ForMac (Objective-C):

- (void)hook_onRevokeMsg:(id)msg {
    if (![[TKWeChatPluginConfig sharedConfig] preventRevokeEnable]) {
        [self hook_onRevokeMsg:msg];
        return;
    }
    // ... (additional code for message recall prevention)
}

WechatExporter (C++):

bool WechatExporter::ExportChat(const std::string& chatId, const std::string& outputPath) {
    // ... (code for exporting chat messages)
    return true;
}

The code snippets highlight the different focus areas of each project. WeChatExtension-ForMac modifies WeChat's behavior, while WechatExporter focuses on data extraction and export functionality.

微信小助手

Pros of WeChatPlugin-MacOS

  • Offers a wider range of features beyond just exporting, including message recall prevention and auto-reply
  • Provides a more integrated experience as a plugin for the WeChat Mac client
  • Actively maintained with more recent updates

Cons of WeChatPlugin-MacOS

  • Limited to macOS, while WechatExporter supports both Windows and macOS
  • More complex setup process, requiring installation as a plugin
  • Potential for compatibility issues with future WeChat updates due to its nature as a plugin

Code Comparison

WeChatPlugin-MacOS (Objective-C):

- (void)hook_sendLogoutCGIWithCompletion:(id)arg1 {
    MMLogInfo(@"hook_sendLogoutCGIWithCompletion");
    if (![[TKWeChatPluginConfig sharedConfig] preventRevokeEnable]) {
        [self hook_sendLogoutCGIWithCompletion:arg1];
    }
}

WechatExporter (C++):

bool WechatExporter::ExportChat(const std::string& userId, const std::string& chatId)
{
    auto it = m_chatMap.find(chatId);
    if (it == m_chatMap.end())
    {
        return false;
    }
    // ... (additional export logic)
}

The code snippets highlight the different approaches: WeChatPlugin-MacOS focuses on intercepting and modifying WeChat's behavior, while WechatExporter primarily deals with data extraction and export functionality.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

WechatExporter

BUG!!! 1.8.0.7以前的版本异步加载方式存在一个比较严重的小白bug:当设置为滚动到页面底部异步加载时,越靠后面的页码,加载的消息数量越少;设置为页面打开全部消息异步加载时,消息只能加载到一半。如果iTunes备份还存在,请使用版本1.8.0.8重新导出一遍。如果过往的备份已经清除了,可以下载补丁程序Win64版本/MacOS 64版本并解压,把wxexpatch.exe/wxexppatch拷贝到导出目录,并执行,来修复已经导出的页面(补丁修复的文件清单可查看日志文件 patch.log)。

本程序参考 https://github.com/stomakun/WechatExport-iOS 修改成C++来实现,便于在各个平台以更少依赖运行。同时增加了聊天群名称的解析支持和更多消息类型的导出支持。导出支持Text、HTML、PDF三种格式。

  • 导出的聊天记录页面可以设置为打开时一次性加载完成(默认方式)、打开时异步加载、页面滑动到底部时加载更多三种方式,可以在菜单“选项”中修改加载方式。

  • 可以在导出的页面增加过滤功能,功能也需要在菜单“选项”中设置。

  • PDF格式,实质是导出打开时一次性加载完成的HTML页面,然后通过Google Chrome或者Microsoft Edge浏览器的功能转成PDF文件,转PDF文件耗时较长,请不要关闭自动弹出的命令行窗口。

  • 增量导出:菜单“选项”中,如果设置了增量导出,则会仅仅导出上一次导出的最后一条消息之后的部分,通过此功能,再一次备份之后,微信中的聊天记录可以删除,下一次导出,可以把同一个聊天群的消息合并在一起。

操作步骤:

  1. 通过iTunes将手机备份到电脑上(备份时不要选择设置口令),Windows操作系统一般位于目录:C:\用户[用户名]\AppData\Roaming\Apple Computer\MobileSync\Backup\。Android手机可以找一个iPad/iPhone设备,把聊天记录迁移到iPad/iPhone设备上,然后通过iTunes备份到电脑上。 iTunesBackup-960

  2. 下载本代码的执行文件:Windows x64版本 或者 MacOS x64版本,然后解压压缩文件

  3. 执行解压出来的WechatExport.exe/WechatExporter (Windows下如果运行报缺少必须的dll文件,请安装Visual C++ 2017 redist后再尝试运行)

  4. 按界面提示进行操作。
    Windows界面截屏 MacOS界面截屏

  5. 导出后的页面示例:
    导出后的页面示例截屏

点击链接可打开网页:https://src.wakin.org/github/wxexp/demo/

模版修改

解压目录下的res\templates(MacOS版本位于Contents\Resources\res)子目录里存放了输出聊天记录的html页面模版,其中通过两个%包含起来的字符串,譬如,%%NAME%%,不要修改之外,其它页面内容和格式都可以自行调整。

特别感谢Chao.M帮忙优化当前的模版。

系统依赖:

Windows版本:Windows 7+(XP不支持), Visual C++ 2017 redist at The latest supported Visual C++ downloads
MacOS版本:MacOS 10.10(Yosemite)+

程序编译

程序依赖如下第三方库:

MacOS下,libxml2,libcurl,libsqlite3直接使用了Xcode自带的库,其它第三方库需自行编译。
libmp3lame需手动删除文件include/libmp3lame.sym中的行:lame_init_old

Windows环境下,silk自带Visual Studio工程文件,可以直接利用Visual Studio编译,其余除了libplist之外,都通过vcpkg可以编译。libplist在vcpkg中也存在,但是在编译x64-windows-static target的时候报了错,于是直接通过Visual Studio建了工程进行编译。

https://github.com/BlueMatthew/WechatExporter/releases/download/v1.0/x64-windows-static.zip https://github.com/BlueMatthew/WechatExporter/releases/download/v1.0/x86-windows-static.zip https://github.com/BlueMatthew/WechatExporter/releases/download/v1.0/x64-windows-static-dbg.zip https://github.com/BlueMatthew/WechatExporter/releases/download/v1.0/x86-windows-static-dbg.zip https://github.com/BlueMatthew/WechatExporter/releases/download/v1.0/x64-macos-static.zip

已测试iTunes和微信版本
iTunes 12.3.3.17 + 微信6.5.9
iTunes 12.5.1.21 + 微信6.3.30
iTunes 12.10.10.2 + 微信7.0.2
iTunes 12.10.9.3 + 微信 7.0.15
iTunes 12.9.5.5 + 微信 7.0.2
Windows 10 + iTunes 12.11.0.26(Microsoft Store) + 微信 7.0.2
Windows 10 + iTunes 12.11.0.26(Microsoft Store) + 微信 8.0.1
Mac Catalina (Embedded iTunes) + 微信 8.0.1/8.0.2
Windows 7 + iTunes 12.10.9.3 + 微信版本 8.0.2
Windows 10 + iTunes 12.11.3.17 + 微信 8.0.7
Windows 7 + iTunes 12.10.9.3/Mac Catalina (Embedded iTunes) + 微信 7.0.2 + iOS 9.3.5
Windows + iTunes 12.10.3.1+ 微信 7.0.10 + iOS 13.3 (@lazybug163)
MacOS 11.6(Embedded iTunes)+ iOS Version: 15.0 + 微信 8.0.9