wxid转微信号软件执行代码,主要实现在线转换,快速高效软件。主要方便针对wxid转换微信号进行微信好友导出备份,建议你在误删微信数据后,立即停止使用手机,防止新数据写入后把删掉的数据覆盖掉!
“””
Module implementing MainWindow.
“”“
from PyQt5.QtCore import QThread, pyqtSignal, Qt, pyqtSlot
from PyQt5.QtWidgets import *
from PyQt5 import QtGui
from Ui_cronSendMessage import Ui_MainWindow
import sys
import itchat
from itchat.content import *
import datetime
import time
import os
import requests
import json
import re
from urllib.request import urlretrieve
import traceback
current_path = os.path.dirname(os.path.abspath(file))
批量导入微信wxid原始码一键转换成微信号。
finished_signal = pyqtSignal(object)
def __init__(self, parent=None, label=None, scroll_widget_layout=None, refresh_button=None, exit_button=None):
super().__init__(parent)
self.l = label
self.scroll_widget_layout = scroll_widget_layout
self.refresh_button = refresh_button
self.exit_button = exit_button
# 在控制台中写入信息
def outputWritten(self, text=None):
cursor = self.l.textCursor()
cursor.movePosition(QtGui.QTextCursor.End)
cursor.insertText(text)
self.l.setTextCursor(cursor)
self.l.ensureCursorVisible()
# 获取uuid
def open_qr(self):
for get_count in range(1):
self.outputWritten('获取uuid中……\n')
uuid = itchat.get_QRuuid()
while uuid is None:
uuid = itchat.get_QRuuid()
time.sleep(1)
self.outputWritten('成功获取uuid\n')
if itchat.get_QR(uuid, picDir=r'%s' % os.path.join(current_path, 'qrcode.jpg')):
break
elif get_count >= 1:
self.outputWritten("获取二维码出错,请重启程序\n")
sys.exit()
return uuid
# 二维码登陆
def login_wechat(self):
try:
uuid = self.open_qr()
self.outputWritten("请扫描二维码\n")
waitForConfirm = False
while 1:
status = itchat.check_login(uuid)
if status == '200':
break
elif status == '201':
if waitForConfirm:
self.outputWritten('请进行确认\n')
waitForConfirm = True
elif status == '408':
self.outputWritten('重新加载二维码\n')
time.sleep(3)
uuid = self.open_qr()
waitForConfirm = False
userInfo = itchat.web_init()
# print(userInfo)
itchat.show_mobile_login()
print('itchat.show_mobile_login() 执行完成!')
# itchat.get_friends(True)
itchat.get_friends()
print('itchat.get_friends(update=True)[0:] 执行完成!')
self.outputWritten('登陆成功!账号为:%s\n' % userInfo['User']['NickName'])
itchat.start_receiving()
print('itchat.start_receiving() 执行完成!')
self.refresh_button.setText("已登录:{}".format(userInfo['User']['NickName']))
self.exit_button.setEnabled(True)
except Exception as e:
print("登录出错:", e)
self.outputWritten('登陆出错:{}\n'.format(e))
try:
# 获取群聊列表
chatrooms = itchat.get_chatrooms()
print('chatrooms = itchat.get_chatrooms() 执行完成!')
print(type(chatrooms))
#return chatrooms
except Exception as e:
self.outputWritten("获取群聊列表出错:{}\n".format(e))
try:
# 获取好友列表
friends = itchat.get_friends()
print('friends = itchat.get_friends() 执行完成!')
print(type(friends))
#return friends
except Exception as e:
self.outputWritten("获取群聊列表出错:{}\n".format(e))
try:
# 获取好友列表
mps = itchat.get_mps()
print('mps = itchat.get_mps() 执行完成!')
print(type(mps))
#return mps
except Exception as e:
self.outputWritten("获取群聊列表出错:{}\n".format(e))
if chatrooms and friends and mps:
return [chatrooms, friends, mps]
def run(self):
try:
self.refresh_button.setEnabled(False)
self.exit_button.setEnabled(True)
self.finished_signal.emit(self.login_wechat())
except Exception as e:
self.outputWritten("运行登录线程出错:{}\n".format(e))
批量实现wxid转换微信号wxid批量转换微信号软件wxid数据提取软件。用软件可以将wxid转成微信号了。
参考:wxid转微信号软件