惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
T
Threatpost
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Recorded Future
Recorded Future
小众软件
小众软件
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
L
LangChain Blog
博客园 - 聂微东
美团技术团队
F
Fortinet All Blogs
I
InfoQ
U
Unit 42
酷 壳 – CoolShell
酷 壳 – CoolShell
阮一峰的网络日志
阮一峰的网络日志
The Cloudflare Blog
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
S
SegmentFault 最新的问题
The GitHub Blog
The GitHub Blog
Vercel News
Vercel News
GbyAI
GbyAI
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
H
Help Net Security
B
Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
aimingoo的专栏
aimingoo的专栏
C
Check Point Blog
Jina AI
Jina AI
The Register - Security
The Register - Security
Hugging Face - Blog
Hugging Face - Blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 叶小钗
Recent Announcements
Recent Announcements
D
DataBreaches.Net
IT之家
IT之家
雷峰网
雷峰网
Y
Y Combinator Blog
W
WeLiveSecurity
P
Proofpoint News Feed
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 司徒正美
月光博客
月光博客
The Hacker News
The Hacker News

GbyAI

企微、个微机器人调研 AIPM角度对于deepseek-r1的解读 Claude MCP 小示例以及一些想法 comfyui官方桌面版V1尝鲜 Creating a LLM-as-a-Judge That Drives Business Results 浅析AutoGLM LLM经典paper傻瓜式速读(持续更新) o1 AI瞎想碎片化思考系列之agent构建 我常用的极品提示词hhh 分享平时觉得比较好用的RSS订阅&&一键导入目前我订阅的源 linkedin 做 agent 的一些建议 现阶段做智能客服 agent 的复盘(持续补充) AIPM技能树 ToC端医美AI伴侣产品-简述(一期) LLM越来越长上下文的一些简单思考 有关 Sora 的一些思考和理解 汇总26个提示词工程技巧 读《人工智能 agent 勘测多模态交互的前景》 读《王慧文清华产品课》 LLM 智能客服 PK 传统智能客服 李想产品实战16讲 自用稳定快速ChatGPT VPN 使用 API 和 Node 创建带有复杂后端逻辑的 GPTs(译) 手递手教你 Obsidian 笔记建站 如何使用虚拟卡升级 Chatgpt Plus 和 Api OpenAI Translator 介绍 + 两个中英互译 Prompt 医美垂直领域智能客服agent搭建说明书(万字长文) 友情免费提供使用 ChatGPT 关于我 友链
py 自动抓取微信群消息
hellloveyy · 2019-05-22 · via GbyAI

准备

  1. 准备一个 17 年之前的微信号,新账号有限制不可以登录网页微信扫码

  2. 准备国内的域名和服务器

过程

  1. 准备机器定时运行 py 脚本(可以用别的写) 本人微信自我检测时间验证最长为 1 天 12 个小时,最短几个小时,可以 crontab 设置10分钟检测登录状态,没有登录则发送微信或者邮件(免费 Mailgun)登录微信扫码图片,扫码登录即可

  2. 检测脚本抓到的固定群里面的固定信息(自己定义群名和信息),自己处理即可,无论入库分析,还是实时发送指定消息,可自由发挥

脚本例子

# 抓取所有加入“拼车”群名的群消息,找到包含“车找人”的消息,写入到wechat.log文件中

#!/usr/bin/python

# coding:utf8

import logging,logging.handlers

import itchat

import time

from itchat.content import *

logging.basicConfig()

myapp = logging.getLogger('myapp')

myapp.setLevel(logging.INFO)

filehandler = logging.handlers.TimedRotatingFileHandler("./wechat.log", when='D', interval=1)

filehandler.suffix = "%Y-%m-%d.log"

myapp.addHandler(filehandler)

# 注册文字信息 设置为群聊信息

@itchat.msg_register([TEXT], isGroupChat=True)

def group_reply_text(msg):

if msg['Type'] == TEXT:

content = msg['Content']

if '车找人' in content:

myapp.info('||%s' %content)

itchat.auto_login(enableCmdQR=2)

# 获取所有通讯录中的群聊

# 需要在微信中将需要同步的群聊都保存至通讯录

itchat.get_chatrooms(update=True)

chatrooms = itchat.search_chatrooms(name='拼车')

itchat.run()