MCPcopy
hub / github.com/liuwons/wxBot / run

Method run

wxbot.py:537–558  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

535 return 'unknown'
536
537 def run(self):
538 self.get_uuid()
539 self.gen_qr_code('qr.png')
540 print '[INFO] Please use WeCaht to scan the QR code .'
541 self.wait4login(1)
542 print '[INFO] Please confirm to login .'
543 self.wait4login(0)
544 if self.login():
545 print '[INFO] Web WeChat login succeed .'
546 else:
547 print '[ERROR] Web WeChat login failed .'
548 return
549 if self.init():
550 print '[INFO] Web WeChat init succeed .'
551 else:
552 print '[INFO] Web WeChat init failed'
553 return
554 self.status_notify()
555 self.get_contact()
556 print '[INFO] Get %d contacts' % len(self.contact_list)
557 print '[INFO] Start to process messages .'
558 self.proc_msg()
559
560 def get_uuid(self):
561 url = 'https://login.weixin.qq.com/jslogin'

Callers 2

mainFunction · 0.80
mainFunction · 0.80

Calls 8

get_uuidMethod · 0.95
gen_qr_codeMethod · 0.95
wait4loginMethod · 0.95
loginMethod · 0.95
initMethod · 0.95
status_notifyMethod · 0.95
get_contactMethod · 0.95
proc_msgMethod · 0.95

Tested by 1

mainFunction · 0.64