Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BillLi
ItChat
提交
58e11df7
I
ItChat
项目概览
BillLi
/
ItChat
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
ItChat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
58e11df7
编写于
11月 07, 2016
作者:
L
LittleCoder
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix missing attachment of docs & add docs
上级
5ddb4b32
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
51 addition
and
12 deletion
+51
-12
README.md
README.md
+4
-1
README.rst
README.rst
+11
-1
README_EN.md
README_EN.md
+15
-2
docs/5.Reply.md
docs/5.Reply.md
+5
-3
itchat/__init__.py
itchat/__init__.py
+7
-3
itchat/client.py
itchat/client.py
+4
-1
itchat/storage.py
itchat/storage.py
+5
-1
未找到文件。
README.md
浏览文件 @
58e11df7
...
...
@@ -188,7 +188,9 @@ A: 有些账号是天生无法给自己的账号发送信息的,建议使用`f
## 作者
[
LittleCoder][littlecodersh
]:
整体构架及完成Python2
Python3版本。
[
LittleCoder][littlecodersh
]:
构架及维护Python2
Python3版本。
[
tempdban][tempdban
]:
协议、构架及日常维护。
[
Chyroc][Chyroc
]:
完成第一版本的Python3构架。
...
...
@@ -220,6 +222,7 @@ A: 有些账号是天生无法给自己的账号发送信息的,建议使用`f
[
fields.py-2
]:
https://gist.github.com/littlecodersh/9a0c5466f442d67d910f877744011705
[
fields.py-3
]:
https://gist.github.com/littlecodersh/e93532d5e7ddf0ec56c336499165c4dc
[
littlecodersh
]:
https://github.com/littlecodersh
[
tempdban
]:
https://github.com/tempdban
[
Chyroc
]:
https://github.com/Chyroc
[
liuwons-wxBot
]:
https://github.com/liuwons/wxBot
[
zixia-wechaty
]:
https://github.com/zixia/wechaty
...
...
README.rst
浏览文件 @
58e11df7
...
...
@@ -19,7 +19,17 @@ Now Wechat is an important part of personal life, hopefully this repo can help y
**Simple uses**
With itchat, you only need to write this to reply personal text messages.
With itchat, if you want to send a message to filehelper, this is how:
.. code:: python
import itchat
itchat.auto_login()
itchat.send('Hello, filehelper', toUserName='filehelper')
And you only need to write this to reply personal text messages.
.. code:: python
...
...
README_EN.md
浏览文件 @
58e11df7
...
...
@@ -20,14 +20,24 @@ pip install itchat
## Simple uses
With itchat, you only need to write this to reply personal text messages.
With itchat, if you want to send a message to filehelper, this is how:
```
python
import
itchat
itchat
.
auto_login
()
itchat
.
send
(
'Hello, filehelper'
,
toUserName
=
'filehelper'
)
```
And you only need to write this to reply personal text messages.
```
python
import
itchat
@
itchat
.
msg_register
(
itchat
.
content
.
TEXT
)
def
text_reply
(
msg
):
itchat
.
send
(
msg
[
'Text'
],
msg
[
'FromUserName'
])
return
msg
[
'Text'
]
itchat
.
auto_login
()
itchat
.
run
()
...
...
@@ -180,6 +190,8 @@ A: Some account simply can't send messages to yourself, so use `filehelper` inst
[
LittleCoder][littlecodersh
]:
Structure
and py2 py3 version
[
tempdban][tempdban
]:
Structure
and daily maintainance
[
Chyroc][Chyroc
]:
first
py3 version
## See also
...
...
@@ -207,6 +219,7 @@ Or you may also use [![Gitter][gitter-picture]][gitter]
[
fields.py-2
]:
https://gist.github.com/littlecodersh/9a0c5466f442d67d910f877744011705
[
fields.py-3
]:
https://gist.github.com/littlecodersh/e93532d5e7ddf0ec56c336499165c4dc
[
littlecodersh
]:
https://github.com/littlecodersh
[
tempdban
]:
https://github.com/tempdban
[
Chyroc
]:
https://github.com/Chyroc
[
liuwons-wxBot
]:
https://github.com/liuwons/wxBot
[
zixia-wechaty
]:
https://github.com/zixia/wechaty
...
...
docs/5.Reply.md
浏览文件 @
58e11df7
...
...
@@ -12,7 +12,7 @@ send(msg='Text Message', toUserName=None)
*
'@fil@文件地址'将会被识别为传送文件,'@img@图片地址'将会被识别为传送图片,'@vid@视频地址'将会被识别为小视频
*
toUserName:发送对象,如果留空将会发送给自己
*
返回值:发送成功->True, 失败->False
*
程序示例:使用的素材可以在
[
这里
]
(
https://yunpan.cn/OcqZm3RJ9fxWdz
)
(提取码:6bc0)
下载
*
程序示例:使用的素材可以在
[
这里
]
[
attachment
]
下载
```
python
#coding=utf8
...
...
@@ -53,7 +53,7 @@ send_file(fileDir, toUserName=None)
*
fileDir:文件路径(不存在该文件时将打印无此文件的提醒)
*
toUserName:发送对象,如果留空将会发送给自己
*
返回值:发送成功->True, 失败->False
*
程序示例:使用的素材可以在
[
这里
]
(
https://yunpan.cn/OcqZm3RJ9fxWdz
)
(提取码:eaee)下载
*
程序示例:使用的素材可以在
[
这里
]
[
attachment
]
(提取码:eaee)下载
```
python
#coding=utf8
...
...
@@ -73,7 +73,7 @@ send_img(fileDir, toUserName=None)
*
fileDir:文件路径(不存在该文件时将打印无此文件的提醒)
*
toUserName:发送对象,如果留空将会发送给自己
*
返回值:发送成功->True, 失败->False
*
程序示例:使用的素材可以在
[
这里
]
(
https://yunpan.cn/OcqZm3RJ9fxWdz
)
(提取码:eaee)下载
*
程序示例:使用的素材可以在
[
这里
]
[
attachment
]
(提取码:eaee)下载
```
python
#coding=utf8
...
...
@@ -103,3 +103,5 @@ itchat.auto_login()
# 请确保该程序目录下存在:demo.mp4
itchat
.
send_file
(
'demo.mp4'
)
```
[
attachment
]:
http://7xrip4.com1.z0.glb.clouddn.com/ItChat/%E4%B8%8A%E4%BC%A0%E7%B4%A0%E6%9D%90.zip
itchat/__init__.py
浏览文件 @
58e11df7
import
time
,
Queue
import
time
try
:
import
Queue
except
ImportError
:
import
queue
as
Queue
from
.client
import
client
from
.
import
content
# this is for creating pyc
__version__
=
'1.1.
19
'
__version__
=
'1.1.
21
'
__client
=
client
()
HOT_RELOAD
=
False
...
...
@@ -87,7 +91,7 @@ def configured_reply():
The main problem I'm worrying about is the mismatching of new friends added on phone
If you have any good idea, pleeeease report an issue. I will be more than grateful. '''
try
:
msg
=
__client
.
msgList
.
get
(
timeout
=
1
000
)
msg
=
__client
.
msgList
.
get
(
timeout
=
1
)
except
Queue
.
Empty
:
pass
else
:
...
...
itchat/client.py
浏览文件 @
58e11df7
...
...
@@ -3,8 +3,11 @@ import os, sys, time, re, io
import
threading
,
subprocess
import
json
,
xml
.
dom
.
minidom
,
mimetypes
import
copy
,
pickle
,
random
import
Queue
import
traceback
try
:
import
Queue
except
ImportError
:
import
queue
as
Queue
import
requests
...
...
itchat/storage.py
浏览文件 @
58e11df7
import
os
,
time
,
copy
,
Queue
import
os
,
time
,
copy
try
:
import
Queue
except
ImportError
:
import
queue
as
Queue
class
Storage
:
def
__init__
(
self
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录