Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

微信登录不起了吗 #960

Open
Qa70601234 opened this issue Jan 21, 2022 · 13 comments
Open

微信登录不起了吗 #960

Qa70601234 opened this issue Jan 21, 2022 · 13 comments

Comments

@Qa70601234
Copy link

Traceback (most recent call last):
  File "f:\wps同步\python练习\微信机器人\321.py", line 197, in <module>
    itchat.auto_login(hotReload=True,loginCallback=login, exitCallback=out)
  File "F:\anaconda\lib\site-packages\itchat\components\register.py", line 31, in auto_login
    self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback,
  File "F:\anaconda\lib\site-packages\itchat\components\login.py", line 55, in login
    status = self.check_login()
  File "F:\anaconda\lib\site-packages\itchat\components\login.py", line 141, in check_login
    if process_login_info(self, r.text):
  File "F:\anaconda\lib\site-packages\itchat\components\login.py", line 183, in process_login_info
    core.loginInfo['wxsid'] = core.loginInfo['BaseRequest']['Sid'] = cookies["wxsid"]
KeyError: 'wxsid'

我重启了一下电脑,然后就登录不起了,换电脑了也不行

@cricketshen
Copy link

我也无法登录,
itchat.auto_login()
File "D:\ProgramData\Anaconda3\lib\site-packages\itchat\components\register.py", line 36, in auto_login
loginCallback=loginCallback, exitCallback=exitCallback)
File "D:\ProgramData\Anaconda3\lib\site-packages\itchat\components\login.py", line 53, in login
status = self.check_login()
File "D:\ProgramData\Anaconda3\lib\site-packages\itchat\components\login.py", line 137, in check_login
if process_login_info(self, r.text):
File "D:\ProgramData\Anaconda3\lib\site-packages\itchat\components\login.py", line 172, in process_login_info
for node in xml.dom.minidom.parseString(r.text).documentElement.childNodes:
File "D:\ProgramData\Anaconda3\lib\xml\dom\minidom.py", line 1968, in parseString
return expatbuilder.parseString(string)
File "D:\ProgramData\Anaconda3\lib\xml\dom\expatbuilder.py", line 925, in parseString
return builder.parseString(string)
File "D:\ProgramData\Anaconda3\lib\xml\dom\expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
xml.parsers.expat.ExpatError: mismatched tag: line 63, column 4

@CtrlAltDelet
Copy link

试试微信网页版能登录不

@cloudflypeng
Copy link

试试微信网页版能登录不

登不上就g了吗

@LX162
Copy link

LX162 commented Mar 27, 2022 via email

@smilebin818
Copy link

smilebin818 commented Apr 13, 2022

█Getting uuid of QR code.
Downloading QR code.
Please scan the QR code to log in.
Please press confirm on your phone.
Traceback (most recent call last):
File "C:\Users\yanbi\Desktop\test (2).py", line 3, in
itchat.auto_login()
File "C:\Python\Python39\lib\site-packages\itchat\components\register.py", line 35, in auto_login
self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback,
File "C:\Python\Python39\lib\site-packages\itchat\components\login.py", line 53, in login
status = self.check_login()
File "C:\Python\Python39\lib\site-packages\itchat\components\login.py", line 137, in check_login
if process_login_info(self, r.text):
File "C:\Python\Python39\lib\site-packages\itchat\components\login.py", line 172, in process_login_info
for node in xml.dom.minidom.parseString(r.text).documentElement.childNodes:
File "C:\Python\Python39\lib\xml\dom\minidom.py", line 1998, in parseString
return expatbuilder.parseString(string)
File "C:\Python\Python39\lib\xml\dom\expatbuilder.py", line 925, in parseString
return builder.parseString(string)
File "C:\Python\Python39\lib\xml\dom\expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
xml.parsers.expat.ExpatError: mismatched tag: line 63, column 4

这个如何解决的呢?

@Li-rr
Copy link

Li-rr commented May 7, 2022

█Getting uuid of QR code.
Downloading QR code.
Please scan the QR code to log in.
Please press confirm on your phone.
Traceback (most recent call last):
File "C:\Users\yanbi\Desktop\test (2).py", line 3, in
itchat.auto_login()
File "C:\Python\Python39\lib\site-packages\itchat\components\register.py", line 35, in auto_login
self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback,
File "C:\Python\Python39\lib\site-packages\itchat\components\login.py", line 53, in login
status = self.check_login()
File "C:\Python\Python39\lib\site-packages\itchat\components\login.py", line 137, in check_login
if process_login_info(self, r.text):
File "C:\Python\Python39\lib\site-packages\itchat\components\login.py", line 172, in process_login_info
for node in xml.dom.minidom.parseString(r.text).documentElement.childNodes:
File "C:\Python\Python39\lib\xml\dom\minidom.py", line 1998, in parseString
return expatbuilder.parseString(string)
File "C:\Python\Python39\lib\xml\dom\expatbuilder.py", line 925, in parseString
return builder.parseString(string)
File "C:\Python\Python39\lib\xml\dom\expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
xml.parsers.expat.ExpatError: mismatched tag: line 63, column 4

这个如何解决的呢?

同遇到这样问题,您解决了吗

@tomy128
Copy link

tomy128 commented May 28, 2022

出现这个问题是因为被拒绝了登录网页版,返回的是一个html页面, 而不是XML数据

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, viewport-fit=cover" />
    <meta name="color-scheme" content="light dark">
    <title>微信网页版</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      body {
        font-family: Microsoft YaHei,-apple-system-font,Helvetica Neue,Helvetica,sans-serif;
        font-size: 14px;
        line-height: 1.6;
      }
      .msg {
        width: 400px;
        margin: 0 auto;
        text-align: center;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
      }
      .msg-title {
        font-size: 24px;
        font-weight: 400;
        color: #191919;
      }
      @media (prefers-color-scheme: dark) {
        .msg-title {
          color: rgba(255, 255, 255, 0.9);
        }
      }
      .msg-desc {
        margin-top: 10px;
        font-weight: 400;
        color: #999999;
      }
      .msg-button-area {
        margin-top: 72px;
      }
      .msg-button {
        width: 228px;
        height: 32px;
        background-color: #07C160;
        border: 0;
        color: #fff;
        border-radius: 3px;
        cursor: pointer;
        display: inline-block;
        vertical-align: middle;
        line-height: 32px;
        text-decoration: none;
      }
      .msg-button:hover {
        background-color: #06ad56;
      }
    </style>
  </head>
  <body>
    <div class="msg">
      <div class="msg-text-area">
        <h2 class="msg-title">提示</h2>
        <p class="msg-desc">由于安全原因,此微信号不能使用网页版微信。你可以前往微信官网&nbsp;https://weixin.qq.com/&nbsp;下载客户端登录。</p>
      </div>
          </div>
  <script src="//res.wx.qq.com/t/wx_fed/webwx/res/static/vendor/vendor_bb4e225.js"></script><script>webpackJsonp([0],[function(n,exports){n.exports=""}]);/* vhtml-webpack-plugin version: 0.1.38 */</script></body>
</html>

@LX162
Copy link

LX162 commented May 28, 2022 via email

@smallevilbeast
Copy link

替代itchat项目, ntchat来了, https://github.com/smallevilbeast/ntchat

@GF-Huang
Copy link

GF-Huang commented Mar 5, 2023

替代itchat项目, ntchat来了, smallevilbeast/ntchat

好一个 404。

@vFire
Copy link

vFire commented Mar 5, 2023 via email

@q23339860
Copy link

出现这个问题是因为被拒绝了登录网页版,返回的是一个html页面, 而不是XML数据

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, viewport-fit=cover" />
    <meta name="color-scheme" content="light dark">
    <title>微信网页版</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      body {
        font-family: Microsoft YaHei,-apple-system-font,Helvetica Neue,Helvetica,sans-serif;
        font-size: 14px;
        line-height: 1.6;
      }
      .msg {
        width: 400px;
        margin: 0 auto;
        text-align: center;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
      }
      .msg-title {
        font-size: 24px;
        font-weight: 400;
        color: #191919;
      }
      @media (prefers-color-scheme: dark) {
        .msg-title {
          color: rgba(255, 255, 255, 0.9);
        }
      }
      .msg-desc {
        margin-top: 10px;
        font-weight: 400;
        color: #999999;
      }
      .msg-button-area {
        margin-top: 72px;
      }
      .msg-button {
        width: 228px;
        height: 32px;
        background-color: #07C160;
        border: 0;
        color: #fff;
        border-radius: 3px;
        cursor: pointer;
        display: inline-block;
        vertical-align: middle;
        line-height: 32px;
        text-decoration: none;
      }
      .msg-button:hover {
        background-color: #06ad56;
      }
    </style>
  </head>
  <body>
    <div class="msg">
      <div class="msg-text-area">
        <h2 class="msg-title">提示</h2>
        <p class="msg-desc">由于安全原因,此微信号不能使用网页版微信。你可以前往微信官网&nbsp;https://weixin.qq.com/&nbsp;下载客户端登录。</p>
      </div>
          </div>
  <script src="//res.wx.qq.com/t/wx_fed/webwx/res/static/vendor/vendor_bb4e225.js"></script><script>webpackJsonp([0],[function(n,exports){n.exports=""}]);/* vhtml-webpack-plugin version: 0.1.38 */</script></body>
</html>

问下具体解决方案是什么?

@Mr-KID-github
Copy link

网页版登录可以通过这个插件绕开,不过不知道怎么整合到这个里面来
https://github.com/adamyi/wechrome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests