Get the URL of this QR code image from the webpage (using PhantomJS)
Download this image using URL (Python)
Save images to your phone (ssh/adb)
Access the method of parsing QR codes through WeChat on your mobile phone, and send this image (automated testing framework for android/ios)
Supplement: Why can’t the PC side be completed independently?
The QR code of the WeChat web version is equivalent to generating a Key for the current browser. When the WeChat mobile client is logged in, it can obtain this Key by scanning the code and tell the WeChat server that the Key is this. The logged in user, therefore the PC browser is authorized to access the chat interface.
This process is completed by WeChat mobile terminal and WeChat server. It cannot be solved by parsing the QR code through Python.
In addition, the QR code we see from the browser is like this:
First of all, you need to know python and packet capture and analysis
Rough steps:
Get the URL of this QR code image from the webpage (using PhantomJS)
Download this image using URL (Python)
Save images to your phone (ssh/adb)
Access the method of parsing QR codes through WeChat on your mobile phone, and send this image (automated testing framework for android/ios)
Supplement: Why can’t the PC side be completed independently?
The QR code of the WeChat web version is equivalent to generating a Key for the current browser. When the WeChat mobile client is logged in, it can obtain this Key by scanning the code and tell the WeChat server that the Key is this. The logged in user, therefore the PC browser is authorized to access the chat interface.
This process is completed by WeChat mobile terminal and WeChat server. It cannot be solved by parsing the QR code through Python.
In addition, the QR code we see from the browser is like this:
The HTML obtained by Python using requests or urllib is like this:
This one
{{qrcodeUrl}}
needs to execute js to generate, so I wrote above to use PhantomJS to get this page, and then give the image to Python.