q绑查询源码
前两天发现找到一个Q绑批量查询的工具看了下是pyinstaller打包的,逆之!得到源码如下:用tkinter编写
import threading
from tkinter import Button, Label, N, W, E, S, Text, END
import tkinter.messagebox, webbrowser, pyperclip
import requests
from method import *
import time
class Window:
banben = 1.0
def __init__(self):
self.root = tkinter.Tk()
self.root.title('批量Q绑查询')
self.root.resizable(0, 0)
self.root.geometry('1000x730')
Button((self.root), text='开始转换', height=2, width=20, fg='red', font=10, command=(self.th1)).grid(row=1,
column=0,
columnspan=6,
pady=10)
Label((self.root), text='输入区', height=0).grid(row=3, column=0, columnspan=3, pady=5)
self.r = tkinter.IntVar()
self.r.set(1)
radio1 = tkinter.Radiobutton((self.root), text='Q查手', value=1, fg='red', font=6, variable=(self.r)).grid(row=2,
column=2,
pady=10)
radio2 = tkinter.Radiobutton((self.root), text='手查Q', value=2, fg='red', font=6, variable=(self.r)).grid(row=2,
column=3,
pady=10)
Label((self.root), text='输出区', height=0).grid(row=3, column=4, columnspan=3, pady=5)
self.text1 = Text((self.root), width=30, height=20, font=10)
self.text2 = Text((self.root), width=36, height=20, font=10)
self.text1.grid(row=4, column=0, columnspan=2, padx=16, pady=10, rowspan=4)
self.text2.grid(row=4, column=3, columnspan=3, padx=16, pady=1, rowspan=4)
Button((self.root), text='复制 >', height=0, width=8, fg='red', font=10, command=(self.fuzhi)).grid(row=5,
column=2)
Button((self.root), text='< 粘贴', height=0, width=8, fg='red', font=10, command=(self.zhantie)).grid(row=6,
column=2)
Button((self.root), text='说明', height=0, width=8, fg='red', font=10, command=(self.sm)).grid(row=8, column=0,
columnspan=2)
Button((self.root), text='清空', height=0, width=8, fg='red', font=10, command=(self.qk)).grid(row=8, column=2,
columnspan=8)
self.th2()
self.root.mainloop()
def bbgx(self):
url = 'https://www.hh52.cn/yy/qbangcha.txt'
txt = requests.get(url).text.encode('ISO-8859-1').decode('utf-8')
txt_list = txt.split('\n')
if str(self.banben) < txt_list:
tkinter.messagebox.showinfo(title='更新提醒', message=(txt_list))
webbrowser.open(txt_list)
self.root.destroy()
elif txt_list == '0':
pass
else:
tkinter.messagebox.showinfo(title='提示', message=(txt_list))
def qdzh(self):
sting = self.r.get()
text_content = self.text1.get('0.0', 'end').replace(' ', '').split('\n')
text_content.pop()
if text_content == '':
tkinter.messagebox.showinfo(title='提示', message='麻烦把内容填一下再提交!')
else:
for text in text_content:
texts = ''
if len(text) < 3:
continue
if sting == 1:
mobile = qq_mobile(str(text))
texts = str(mobile)
if sting == 2:
qq = mobile_qq(text)
texts = str(qq)
self.text2.insert(END, texts + '\n')
tkinter.messagebox.showinfo(title='提示', message='查询完成!!')
def qk(self):
self.text1.delete(1.0, END)
self.text2.delete(1.0, END)
def sm(self):
tkinter.messagebox.showinfo(title='说明',
message='欢迎使用本软件,软件仅用于交流使用,严禁信息倒卖以及一些非法用途,否则,一切后果请用户自负。您必须在下载后的24个小时之内,从您的电脑或手机中彻底删除软件。')
def th1(self):
t1 = threading.Thread(target=(self.qdzh))
t1.setDaemon(True)
t1.start()
tkinter.messagebox.showinfo(title='提示', message='已经开始查询,请耐心等待!')
def th2(self):
t2 = threading.Thread(target=(self.bbgx))
t2.setDaemon(True)
t2.start()
def fuzhi(self):
text2 = self.text2.get('0.0', 'end')
pyperclip.copy(text2)
def zhantie(self):
text1 = pyperclip.paste()
self.text1.delete(1.0, END)
self.text1.insert(END, text1)
if __name__ == '__main__':
w = Window()
珍惜生命,果断回帖。 啥也不说了,感谢楼主分享哇! 珍惜生命,果断回帖。 榎本梓,堀越由美,九条玲子,栗山绿,碓水律子 珍惜生命,果断回帖。 啥也不说了,感谢楼主分享哇! 珍惜生命,果断回帖。 啥也不说了,感谢楼主分享哇! 正需要,支持楼主大人了!