Browse Source

Add tty qr support on Linux.

liuwons 9 years ago
parent
commit
21cdbd2b5b
1 changed files with 2 additions and 4 deletions
  1. 2 4
      wxbot.py

+ 2 - 4
wxbot.py

@@ -73,10 +73,8 @@ class WXBot:
         if self.conf['qr'] == 'png':
             qr.png(qr_file_path)
         elif self.conf['qr'] == 'tty':
-            print 'Not support tty'
-            pass
-            #qr.print_tty()
-
+            print(qr.terminal(quiet_zone=1))
+            
     def wait4login(self, tip):
         time.sleep(tip)
         url = 'https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?tip=%s&uuid=%s&_=%s' % (tip, self.uuid, int(time.time()))