def weixin_login(self): url = "https://mp.weixin.qq.com/cgi-bin/bizlogin?action=startlogin" params = { 'username': self.username, 'pwd': CommonUtil.md5(self.password), 'imgcode': '', 'f': 'json' } response = self.session.post(url, data=params, headers=self.headers, verify=False) if response.status_code == 200: target = response.content.decode('utf-8') print(target) self.get_weixin_login_qrcode()