EverydayWechat is a WeChat gadget based on Python3 and Itchat.
You can regularly send daily weather, reminders, and daily quotes to friends or group chats, and you can also intelligently automatically reply to friends' messages. There is also a group assistant function that allows you to install X in a group of friends. The operation is simple, and novice users can get started quickly.
This project relies on the web version of WeChat for development. If you cannot log in, you cannot use this project; and there is no solution.
This project relies on the web version of WeChat for development. If you cannot log in, you cannot use this project; and there is no solution.
This project relies on the web version of WeChat for development. If you cannot log in, you cannot use this project; and there is no solution.
Web version of WeChat address: https://wx.qq.com/.
Looking for a Python & Android job in Beijing.
Add WeChat: address.
Version update log
Recently, I started a project that is similar but has different functions: WeChat Group Assistant.
Welcome everyone to star.
It is prohibited to use this tool for commercial purposes . If legal disputes arise, I have nothing to do with it.
Note: If you add a Turing robot reply to your girlfriend, please consider it carefully! ! ! !
Not every girlfriend of yours can accept it. You use the robot to reply to him with "heartwarming words" to comfort her. Artificial intelligence may also be a mentally retarded robot. Think about it if the robot replied to your girlfriend: "Let's break up." Maybe you really broke up. Although I will give a thumbs up silently in my heart (Confessions of a Single)
请点击页面顶部靠右star 与fork
What should you do if you don’t have any friends to test sending reminders, and you can’t play automatic reply with just one person (I’m about to cry.jpg).
You can add "File Transfer Assistant" as a girlfriend (is the girlfriend you are talking about your hands? jpg). Such an account can also be tested, send reminders to the file transfer assistant, and chat intelligently with the file transfer assistant.
All current project configurations are in the _config.yaml file.
Please strictly follow the yaml syntax format for the configuration file, yaml learning address:
https://ansible-tran.readthedocs.io/en/latest/docs/YAMLSyntax.html
http://einverne.github.io/post/2015/08/yaml.html
机器人渠道(1: 图灵机器人,2: 一个AI ,3 : 青云客,4 腾讯智能闲聊,5:天行机器人,6:海知智能,7:思知机器人)
bot_channel: 7
The default is Sizhi Robot, which is the smartest one without applying for a key. .
There are two modes
(1) When automatic reply to all friends is not used, that is: when is_auto_reply_all: False.
At this time, set the whitelist members who can reply, as follows:
is_auto_reply_all:False
# 指定自动回复的好友名单。
auto_reply_white_list:
- '好友1'
- '好友2'
(2) When automatic reply to all friends is turned on, that is: is_auto_reply_all: True.
Choose not to automatically reply to blacklist members: as follows
is_auto_reply_all:True
auto_reply_black_list:
- '好友1'
- '好友2'
Except for Qingyunke, other robots need to go to the corresponding official website, register and obtain the corresponding key. Configure whichever one is needed.
Note: Do not turn on the "Key" option.
turing_conf:
apiKey: '你所获取apikey'
The Turing robot must be authenticated before it can be used. Users of the free version can use 100 pieces of information every day, use it and cherish it.
txapi_conf:
app_key: '个人中心中的key'
reply_name: '宝宝' # 回复的人的名字(可空)(也可在个人中心->机器人管理 修改)
bot_name: '老公' # 机器人的名字(可空)
qqnlpchat_conf:
app_id: '你申请的api_id'
app_key: '你申请的app_key'
Open the Turing Robot official website: http://www.yige.ai to register.
Create an application and get the "Client Access Token" in the "API Key"
Will be filled in the _config.yaml file:
yigeai_conf:
client_token: '客户访问令牌'
Open the official website of Ownthink: https://www.ownthink.com/ to register.
Create a robot and get the appid.
Will be filled in the _config.yaml file:
ownthink_conf:
app_key: '你申请的api_id'
Regarding automatic replies, the information currently available to the public is:
alarm_info:
is_alarm: True
Fill in the friend information, for example:
alarm_timed:
- "9:00"
- "12:30"
- "22:00"
wechat_name:
- '文件传输助手'
- '诗风'
group_name:
- 'EverydayWechat 交流群'
is_tomorrow: False
city_name: '桂林'
dictum_channel : 3
start_date: '2017-10-10'
start_date_msg: '爱你的第{}天'
calendar: True
horescope: "处女座"
sweet_words: '你脚下的蚂蚁'
Relevant parameter description:
name | Example | Required | illustrate |
---|---|---|---|
wechat_name | 'wife' | Optional | Friend name: Multiple people can be filled in. Friend’s WeChat nickname or comment name (WeChat ID cannot be entered) |
alarm_timed | '9:30' | Required | Timing time, you can fill in multiple |
alarm_jitter | 300 | Available | Sent randomly within 300 seconds before and after the scheduled time |
group_name | 'Communication group' | Optional | Group chat name, you can fill in multiple names. You must save the required group chat to your address book. |
is_tomorrow | True | Available | Whether to send tomorrow's information (such as weather, horoscope, perpetual calendar). |
city_name | 'Chengdu' | Available | City name: The city where your friend is located, used to send weather. |
air_quality_city | 'Chengdu' | Available | City with air quality PM25. |
dictum_channel | 2 | Available | Motto channels (see table below) |
start_date | '2017-10-10' | Available | Date of acquaintance: Calculate the number of days to the current day. |
start_date_msg | 'The {}day of loving you' | Available | acquaintance date copywriting |
sweet_words | 'From your handsome husband' | Available | Sweet suffix. (Direct description of the straight man of steel) |
horescope | 'Virgo' | Available | Zodiac sign or friend’s birthday. For sending horoscopes |
calendar | True | Available | Perpetual calendar information |
wechat_name , group_name must have at least one.
Motto channels: 1: ONE●One, 2: PowerWord (daily bilingual), 3: Native love words, 4: One word, 5: Joke, 6: Love letter from the Republic of China, 7: Rainbow fart.
Tips: You can fill in wechat_name into the " File Transfer Assistant ", so that the reminder will be sent to the File Transfer Assistant in your WeChat. It is convenient to quickly check the effect without disturbing others.
If you need a quick experience, you can set alarm_timed to a few minutes after the current system time. For example, the current time is 11:35, and the reminder is set to be sent after 5 minutes, that is: alarm_timed: 11:40
Of course, you can also set up a different set of plans according to your own needs. Specific reference code.
An example reminder:
2019-06-29 星期六 农历五月廿七
【宜】嫁娶,祭祀,沐浴,扫舍,修饰垣墙
【忌】行丧,安葬
桂林天气预报
【今日天气】阵雨
【今日温度】低温 26.0℃,高温 33.0℃
【今日风速】南风<3级
【出行提示】阵雨来袭,出门记得带伞
【桂林PM2.5】142 轻度污染
处女座今日运势
【幸运颜色】2
【幸运数字】薄荷绿
【综合运势】今天的你有机会重逢旧同学、旧朋友,对方会为你带来一些小惊喜,可能是某个不错的商机,也可能是某个消息。工作/学习上,今天的你目标性很强,能把当初奋斗的初心捡回来,重新出发。感情方面,有伴者今天要提防烂桃花的挑拨离间,多给对方一些信任。
你知道五氧化二磷被氧化前是什么样子嘛,什么样子?五二磷。
宝贝这是我们在一起的第628天
你脚下的蚂蚁
Just put the form to explain.
name | Example | Required | illustrate |
---|---|---|---|
is_open | True | Required | Whether to enable the group assistant function |
is_all | True | Required | Whether to enable it for all groups. When turned on, only the blacklist will not be affected (turn it on with caution!) |
group_name_white_list | "Group name" | Optional | Whitelist users. When is_all:Fase. Only process messages in this group |
group_name_black_list | "Group name" | Optional | Blacklist users. When is_all: True. Users in this group are not affected. |
is_at | True | Required | Aite mark. Messages will only be processed when someone else is aiting themselves (close it with caution!). |
is_auto_reply | True | Required | # Enable group automatic reply (enable with caution!) |
is_weather | True | Required | Whether to enable weather query. |
is_calendar | True | Required | Whether to enable Wanli year query |
is_rubbish | True | Required | Whether to enable spam query |
is_moviebox | True | Required | Whether to enable computer box office inquiry |
is_express | True | Required | Whether to enable express delivery information query |
is_air_quality | True | Required | Whether to enable air quality query |
First you have to install the mongodb database installation. For the installation method, please Google it yourself.
The official installation tutorial is also available: https://docs.mongodb.com/v3.2/administration/install-community/
(1) Set is_open_db to "True".
(2) Set host and port. Tips: There are no special requirements, or those who are not familiar with databases do not need to set it up.
First, install Python3 and configure the environment. I personally recommend that novices install Anaconda. For specific installation tutorials, you can search on Google by yourself~
Directly download this project or clone the project to your local computer.
Use pip to install dependencies:
pip3 install -r requirements.txt
# 或者是使用 pip
# pip install -r requirements.txt
Jump to the project directory in local cmd and run:
python run.py
The QR code will pop up when you run it for the first time, scan the code to log in. If the output log prints: "Login successful", it means the operation is successful.
If you run it again for a period of time after successful login, WeChat will remain logged in and there is no need to scan the QR code again.
If you need to switch users, modify the is_forced_switch attribute to True in the _config.yaml file.
docker build -t everyday_wechat:v1 .
docker run everyday_wechat:v1
This project is inspired by the following projects and refers to some of the ideas. I would like to express my gratitude to these developers.
Because the number of people has exceeded 100, please add wx: sfyc1314 robot as a friend, and fill in the verification information: "github"! ! ! , the robot will automatically pass.
After passing, reply: "Add to group" and you will be automatically added to the group. The group assistant has also been open sourced. The address is: https://github.com/sfyc23/WechatAddGroupHelper. Everyone is welcome to star.
Robot QR code:
If you think this project is helpful, why not make a small donation to it?
Regardless of the amount, your donation will encourage the author to continue developing new features! ?
Thank you for your support!
Donation methods are as follows:
MIT License