Skip to content

Commit e0fd2fc

Browse files
committed
Format code and solve the dead cycle problem.
1 parent ed6e534 commit e0fd2fc

File tree

3 files changed

+751
-703
lines changed

3 files changed

+751
-703
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
Python包装Web微信实现的微信机器人框架。可以很容易地实现微信机器人。
44

5+
Web微信协议参考资料:
6+
7+
[挖掘微信Web版通信的全过程](http://www.tanhao.me/talk/1466.html/)
8+
9+
[微信协议简单调研笔记](http://www.blogjava.net/yongboy/archive/2015/11/05/410636.html)
10+
11+
[qwx: WeChat Qt frontend 微信Qt前端](https://github.com/xiangzhai/qwx)
12+
513
## 环境与依赖
614

715
目前只能运行于Python 2环境 。

test.py

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1-
#!/usr/bin/env python
2-
# coding: utf-8
3-
4-
from wxbot import *
5-
6-
7-
class MyWXBot(WXBot):
8-
def handle_msg_all(self, msg):
9-
if msg['msg_type_id'] == 4 and msg['content']['type'] == 0:
10-
self.send_msg_by_uid('hi', msg['user']['id'])
11-
'''
12-
def schedule(self):
13-
self.send_msg('tb', 'schedule')
14-
time.sleep(1)
15-
'''
16-
17-
18-
def main():
19-
bot = MyWXBot()
20-
bot.DEBUG = True
21-
bot.conf['qr'] = 'png'
22-
bot.run()
23-
24-
25-
if __name__ == '__main__':
26-
main()
1+
#!/usr/bin/env python
2+
# coding: utf-8
3+
4+
from wxbot import *
5+
6+
7+
class MyWXBot(WXBot):
8+
def handle_msg_all(self, msg):
9+
if msg['msg_type_id'] == 4 and msg['content']['type'] == 0:
10+
self.send_msg_by_uid('hi', msg['user']['id'])
11+
12+
13+
'''
14+
def schedule(self):
15+
self.send_msg('tb', 'schedule')
16+
time.sleep(1)
17+
'''
18+
19+
20+
def main():
21+
bot = MyWXBot()
22+
bot.DEBUG = True
23+
bot.conf['qr'] = 'png'
24+
bot.run()
25+
26+
27+
if __name__ == '__main__':
28+
main()

0 commit comments

Comments
 (0)