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

推荐订阅源

C
Check Point Blog
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
U
Unit 42
美团技术团队
NISL@THU
NISL@THU
C
Cisco Blogs
SecWiki News
SecWiki News
N
Netflix TechBlog - Medium
Forbes - Security
Forbes - Security
Cloudbric
Cloudbric
雷峰网
雷峰网
T
Tailwind CSS Blog
博客园 - 司徒正美
The Register - Security
The Register - Security
L
LangChain Blog
S
Security Affairs
Hacker News - Newest:
Hacker News - Newest: "LLM"
B
Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Threat Research - Cisco Blogs
I
InfoQ
S
Schneier on Security
L
Lohrmann on Cybersecurity
量子位
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Martin Fowler
Martin Fowler
Schneier on Security
Schneier on Security
F
Fortinet All Blogs
TaoSecurity Blog
TaoSecurity Blog
K
Kaspersky official blog
Google DeepMind News
Google DeepMind News
Cisco Talos Blog
Cisco Talos Blog
PCI Perspectives
PCI Perspectives
Attack and Defense Labs
Attack and Defense Labs
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
D
Docker
N
News | PayPal Newsroom
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
H
Hacker News: Front Page
云风的 BLOG
云风的 BLOG
Microsoft Security Blog
Microsoft Security Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 聂微东
Webroot Blog
Webroot Blog
MongoDB | Blog
MongoDB | Blog

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()