Convert Figma logo to code with AI

0x5e logowechat-deleted-friends

查看被删的微信好友

4,771
1,526
4,771
52

Top Related Projects

微信助手:1.每日定时给好友(女友)发送定制消息。2.机器人自动回复好友。3.群助手功能(例如:查询垃圾分类、天气、日历、电影实时票房、快递物流、PM2.5等)

25,429

A complete and graceful API for Wechat. 微信个人号接口、微信机器人及命令行微信,三十行即可自定义个人号机器人。

13,948

微信机器人 / 可能是最优雅的微信个人号 API ✨✨

基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT-o1/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。

Quick Overview

The wechat-deleted-friends repository is a Python script that helps WeChat users identify which of their contacts have deleted them from their friend list. It automates the process of checking friend status by simulating WeChat Web client actions, providing users with a list of contacts who may have removed them.

Pros

  • Automates the tedious process of manually checking deleted friends
  • Provides insights into user's WeChat social network
  • Open-source project allowing for community contributions and improvements
  • Works with the WeChat Web interface, avoiding potential mobile app restrictions

Cons

  • May violate WeChat's terms of service or user agreement
  • Could potentially be detected and blocked by WeChat, leading to account restrictions
  • Requires users to log in to their WeChat account through the script, raising potential security concerns
  • May not work consistently due to changes in WeChat's web interface or security measures

Code Examples

# Example 1: Initializing the WeChatFriends class
from wdf import WeChatFriends

wechat = WeChatFriends()
wechat.login()  # This will open a QR code for scanning
# Example 2: Getting the list of friends
friends = wechat.get_friends()
print(f"Total friends: {len(friends)}")
# Example 3: Checking for deleted friends
deleted_friends = wechat.check_deleted_friends()
for friend in deleted_friends:
    print(f"{friend['NickName']} ({friend['UserName']}) has deleted you")

Getting Started

To use the wechat-deleted-friends script:

  1. Clone the repository:

    git clone https://github.com/0x5e/wechat-deleted-friends.git
    cd wechat-deleted-friends
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Run the script:

    python wdf.py
    
  4. Scan the QR code with your WeChat mobile app to log in.

  5. Wait for the script to complete the checking process.

Note: Use this script responsibly and be aware of potential risks to your WeChat account.

Competitor Comparisons

微信助手:1.每日定时给好友(女友)发送定制消息。2.机器人自动回复好友。3.群助手功能(例如:查询垃圾分类、天气、日历、电影实时票房、快递物流、PM2.5等)

Pros of EverydayWechat

  • More comprehensive functionality, including daily message sending and weather reports
  • Active development with regular updates and improvements
  • Larger community and more stars on GitHub

Cons of EverydayWechat

  • More complex setup and configuration required
  • Potentially higher resource usage due to additional features
  • May be overkill for users only interested in tracking deleted friends

Code Comparison

EverydayWechat:

def get_weather_info(cityname):
    url = 'http://wthrcdn.etouch.cn/weather_mini?city=' + cityname
    try:
        r = requests.get(url)
        data = r.json()['data']['forecast'][0]
        return '{}: {} ~ {}'.format(data['date'], data['low'], data['high'])
    except:
        return None

wechat-deleted-friends:

def get_deleted_friends(core):
    deleted_friends = []
    for friend in core.get_friends():
        if core.is_friend_deleted(friend):
            deleted_friends.append(friend)
    return deleted_friends

The code snippets highlight the different focus of each project. EverydayWechat includes functionality for retrieving weather information, while wechat-deleted-friends concentrates on identifying deleted friends from the user's contact list.

25,429

A complete and graceful API for Wechat. 微信个人号接口、微信机器人及命令行微信,三十行即可自定义个人号机器人。

Pros of ItChat

  • More comprehensive WeChat API wrapper, offering broader functionality beyond just friend management
  • Actively maintained with regular updates and improvements
  • Extensive documentation and examples for easier implementation

Cons of ItChat

  • More complex setup and usage due to its broader scope
  • Potentially overkill for users only interested in tracking deleted friends
  • Larger codebase and dependencies may lead to longer execution times

Code Comparison

wechat-deleted-friends:

def get_contact():
    url = base_uri + '/webwxgetcontact?pass_ticket=%s&skey=%s&r=%s' % (
        pass_ticket, skey, int(time.time()))
    r = myRequests.get(url, headers=headers)
    r.encoding = 'utf-8'
    data = json.loads(r.text)
    return data['MemberList']

ItChat:

def get_friends(self, update=False):
    if not self.loginInfo['wxuin']:
        return None
    if update:
        url = '%s/webwxgetcontact?r=%s&seq=0&skey=%s' % (
            self.loginInfo['url'], int(time.time()),
            self.loginInfo['skey'])
        headers = { 'ContentType': 'application/json; charset=UTF-8' }
        r = self.s.get(url, headers=headers)
        self.memberList = json.loads(r.text)['MemberList']
    return self.memberList

Both projects use similar approaches to retrieve contact information, but ItChat's implementation is more modular and integrated into a larger class structure.

13,948

微信机器人 / 可能是最优雅的微信个人号 API ✨✨

Pros of wxpy

  • More comprehensive WeChat API wrapper with broader functionality
  • Active development and maintenance
  • Better documentation and examples

Cons of wxpy

  • Steeper learning curve due to more complex API
  • May be overkill for simple tasks like finding deleted friends

Code comparison

wechat-deleted-friends:

def get_contact_list():
    url = base_uri + '/webwxgetcontact?pass_ticket=%s&skey=%s&r=%s' % (
        pass_ticket, skey, int(time.time()))
    r = requests.post(url, data='{}')
    return json.loads(r.text)['MemberList']

wxpy:

from wxpy import *
bot = Bot()
friends = bot.friends()
for friend in friends:
    print(friend)

Summary

wechat-deleted-friends is a focused tool for finding deleted WeChat friends, while wxpy is a more comprehensive WeChat API wrapper. wxpy offers broader functionality and better documentation but may be more complex for simple tasks. wechat-deleted-friends is simpler and more straightforward for its specific purpose but lacks the versatility of wxpy. The code comparison shows the difference in approach, with wxpy providing a higher-level abstraction for WeChat interactions.

基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT-o1/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。

Pros of chatgpt-on-wechat

  • Integrates ChatGPT functionality directly into WeChat, providing AI-powered conversations
  • Offers a more feature-rich and versatile application with multiple use cases
  • Actively maintained with regular updates and improvements

Cons of chatgpt-on-wechat

  • More complex setup and configuration required compared to wechat-deleted-friends
  • Potential privacy concerns due to sending chat data to external AI services
  • Higher resource usage and potential costs associated with API calls

Code Comparison

wechat-deleted-friends:

def get_contact_list():
    contact_list = []
    for contact in itchat.get_friends(update=True):
        contact_list.append(contact['UserName'])
    return contact_list

chatgpt-on-wechat:

def handle_single_msg(msg):
    context = Context(openai_api_key, system_prompt)
    clear_memory_commands = conf().get('clear_memory_commands', ['#清除记忆'])
    if msg['Content'].strip() in clear_memory_commands:
        context.clear_memory()
        return "记忆已清除"
    return context.handle_single_msg(msg)

The code snippets highlight the different focus areas of the two projects. wechat-deleted-friends primarily deals with managing contact lists, while chatgpt-on-wechat handles message processing and integrates with the OpenAI API for generating responses.

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

查看被删的微信好友

注意

目前存在两个阻碍使用的问题,所以已经无法使用了,请后面来的同学们看看就好,不用尝试了。。。。谢谢大家的关注~

  • 新建群组,添加好友的接口存在数量限制。在一定时间内添加的总人数超过一定数量后,接口就会无法使用。(幻想用随机数的童鞋放弃吧。。可能是你好友数量不够多?)
  • 据V站朋友反馈(@kobe1941):即使你已被对方删除好友,依然可以拉对方入群,所以该脚本工作的前提已不存在。

推荐两个相关项目:

Urinx / WeixinBot:网页版微信API,包含终端版微信及微信机器人

geeeeeeeeek / electronic-wechat:💬 A better WeChat on macOS and Linux. Fewer bugs, more features. Built with Electron by Zhongyi Tong.

协议相关文档:

xiangzhai / qwx - 网页微信客户端封包大全

介绍

原理就是新建群组,如果加不进来就是被删好友了(不要在群组里讲话,别人是看不见的)

用的是微信网页版的接口

查询结果可能会引起一些心理上的不适,请小心使用..(逃

Mac OS用法: 启动Terminal

$ python wdf.py

按指示做即可

请确保requests模块已成功安装

$ pip install requests #安装requests模块

暂未解决的问题

错误1205 "操作太频繁,请稍后再试。" (存在接口访问限制)

不清楚接口的限制策略是什么,有的同学能用有的不能用

打印被拉黑的列表(被限制了,没法测试..)

URLError (网络异常未处理)

最终会遗留下一个只有自己的群组,需要手工删一下

其他语言实现

Go 版

Node.js 版

Chrome 插件