Skip to content

Commit 523c3e9

Browse files
committed
fixed generate qrcode error, and update dependance
1 parent 46d7643 commit 523c3e9

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Python包装的网页微信API。可以很容易地实现微信机器人。
88
```bash
99
pip install requests
1010
pip install pyqrcode
11+
pip install pypng
1112
```
1213

1314
## Demo

wxbot.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,8 @@ def get_uuid(self):
7575

7676
def gen_qr_code(self):
7777
string = 'https://login.weixin.qq.com/l/' + self.uuid
78-
qr = pyqrcode.QRCode()
79-
qr.border = 1
80-
qr.add_data(string)
81-
qr.make(fit=True)
82-
img = qr.make_image()
83-
img.save('qr.jpg')
78+
qr = pyqrcode.create(string)
79+
qr.png('qr.jpg')
8480

8581
def wait4login(self, tip):
8682
time.sleep(tip)

0 commit comments

Comments
 (0)