网友xmaj2008分享:
集成py代码原作者
http://aibing.cc/thread-7455385-1-1.html
仅负责集成,更新随机
需要win7以上64位系统,不支持32位。
自己使用,不保证能够运行。
地址忘掉了
链接: https://pan.baidu.com/s/18cePf_7s7AFvgCwlmEGusQ 提取码: 8nuw 复制这段内容后打开百度网盘手机App,操作更方便哦
软件截图:
使用说明:
抓取cookie 填入cookie文本框内,点击登录,如果手机号码没错就不用管
选择需要购买的物品
点击开始
自动刷新间隔,公众版本无效,默认5s刷新一次。
代码源码,供参考。
- class autoTab(QtWidgets.QWidget):
- def __init__(self,name=’Auto_Tab’,tabel_dict={},parent=None):
- super(autoTab, self).__init__(parent)
- self.tabName = name
- self.tabel_dict = tabel_dict
- self.setObjectName("tab")
- self.gridLayout_3 = QtWidgets.QGridLayout(self)
- self.gridLayout_3.setObjectName("gridLayout_3")
- self.groupBox = QtWidgets.QGroupBox(self)
- self.groupBox.setObjectName("groupBox")
- self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox)
- self.gridLayout_2.setObjectName("gridLayout_2")
- self.label = QtWidgets.QLabel(self.groupBox)
- self.label.setObjectName("label")
- self.gridLayout_2.addWidget(self.label, 1, 0, 1, 2)
- spacerItem = QtWidgets.QSpacerItem(71, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
- self.gridLayout_2.addItem(spacerItem, 2, 0, 1, 1)
- self.lineEdit = QtWidgets.QLineEdit(self.groupBox)
- self.lineEdit.setObjectName("lineEdit")
- self.gridLayout_2.addWidget(self.lineEdit, 1, 2, 1, 2)
- self.pushButton = QtWidgets.QPushButton(self.groupBox)
- self.pushButton.setObjectName("pushButton")
- self.gridLayout_2.addWidget(self.pushButton, 2, 1, 1, 2)
- spacerItem1 = QtWidgets.QSpacerItem(124, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
- self.gridLayout_2.addItem(spacerItem1, 2, 3, 1, 1)
- self.textEdit = QtWidgets.QTextEdit(self.groupBox)
- self.textEdit.setObjectName("textEdit")
- self.gridLayout_2.addWidget(self.textEdit, 0, 0, 1, 4)
- self.gridLayout_3.addWidget(self.groupBox, 0, 0, 3, 1)
- self.textBrowser_2 = QtWidgets.QTextBrowser(self)
- self.textBrowser_2.setObjectName("textBrowser_2")
- self.gridLayout_3.addWidget(self.textBrowser_2, 2, 1, 2, 1)
- self.textBrowser = QtWidgets.QTextBrowser(self)
- self.textBrowser.setObjectName("textBrowser")
- self.gridLayout_3.addWidget(self.textBrowser, 1, 1, 1, 1)
- self.groupBox_2 = QtWidgets.QGroupBox(self)
- self.groupBox_2.setObjectName("groupBox_2")
- self.gridLayout = QtWidgets.QGridLayout(self.groupBox_2)
- self.gridLayout.setObjectName("gridLayout")
- spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
- self.gridLayout.addItem(spacerItem2, 0, 0, 1, 1)
- self.pushButton_2 = QtWidgets.QPushButton(self.groupBox_2)
- self.pushButton_2.setObjectName("pushButton_2")
- self.gridLayout.addWidget(self.pushButton_2, 2, 5, 1, 1)
- self.lineEdit_2 = QtWidgets.QLineEdit(self.groupBox_2)
- self.lineEdit_2.setObjectName("lineEdit_2")
- self.gridLayout.addWidget(self.lineEdit_2, 0, 5, 1, 1)
- self.label_2 = QtWidgets.QLabel(self.groupBox_2)
- self.label_2.setObjectName("label_2")
- self.gridLayout.addWidget(self.label_2, 0, 2, 1, 1)
- self.comboBox = QtWidgets.QComboBox(self.groupBox_2)
- self.comboBox.setObjectName("comboBox")
- self.gridLayout.addWidget(self.comboBox, 2, 0, 1, 3)
- self.gridLayout_3.addWidget(self.groupBox_2, 3, 0, 1, 1)
- _translate = QtCore.QCoreApplication.translate
- self.groupBox.setTitle(_translate("Form", "Cookie"))
- self.label.setText(_translate("Form", "电话号码:"))
- self.pushButton.setText(_translate("Form", "登录"))
- self.groupBox_2.setTitle(_translate("Form", "自动下单"))
- self.label_2.setText(_translate("Form", "自动刷新间隔:"))
- self.pushButton_2.setText(_translate("Form", "开始"))
- self.pushButton.clicked.connect(self.login)
- self.pushButton_2.clicked.connect(self.auto_order)
- self.comboBox.currentIndexChanged.connect(self.gen_order_data)
- self.startOrder = True
- self.timer = QTimer() # 初始化定时器
- self.timer.timeout.connect(self.order)
- self.count = 0
- try:
- with open(‘cookie.str’,’r’,encoding=’utf-8′) as f:
- cookie = f.readline()
- self.textEdit.setText(cookie)
- except Exception as e:
- print(e)
- def get_cookie_dict(self,cookie_str):
- cookie_dict = {}
- for tmp_str in cookie_str.split(‘;’):
- tmp_str = tmp_str.strip()
- cookie_dict[tmp_str.split(‘=’)[0]] = tmp_str.split(‘=’)[1]
- self.cookie_dict = cookie_dict
- return cookie_dict
- def login(self):
- try:
- cookie_str = self.textEdit.toPlainText()
- cookie_dict = self.get_cookie_dict(cookie_str)
- url = "https://m.client.10010.com/welfare-mall-front-activity/mobile/activity/get619Activity/v1?whetherFriday=YES"
- header = {"User-Agent":"Mozilla/5.0 (Linux;Android 10;GM1910) AppleWebKit/\
- 537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Mobile Safari/537.36; \
- unicom{version:android@7.0500}"}
- r = requests.get(url,cookies=cookie_dict,headers=header,timeout=3)
- print(r.text)
- self.respon = r
- self.lineEdit.setText(cookie_dict[‘u_account’])
- #self.textBrowser.setText(r.text)
- with open(‘cookie.str’,’w’,encoding=’utf-8′) as f:
- f.write(cookie_str)
- self.get_goodsList()
- except Exception as e:
- print(e)
- r = ”
- self.textBrowser.setText(str(e))
- return r
- def get_goodsList(self):
- unifrigoodsq1 = self.respon.json()
- unifriactL1 = unifrigoodsq1["resdata"]["activityList"]
- unifrigoodsnl1 = []
- unifrigoodsnl11 = []
- unifrigoodsidl1 = []
- unifripaypril1 = []
- unifrigoodsbtl1 = []
- a = 0
- unifristate1 = {"10":"立即抢购","20":"去查看","30":"无法抢购","40":"已抢光","50":"未开始"}
- for b in range(0,len(unifriactL1)):
- for i,goods in enumerate(unifriactL1[b]["goodsList"],a+1):
- unifrigoodsnl11.append(str(i)+" "+unifriactL1[b]["navClock"]+\
- unifristate1.get(goods["state"])+" "+goods["goodsName"])
- unifrigoodsnl1.append(goods["goodsName"])
- nowdate1 = time.strftime("%Y-%m-%d",time.localtime(int(time.time())))
- actLtimes1 = int(time.mktime(time.strptime(nowdate1+" "+unifriactL1[b]["navClock"]+":00",
- "%Y-%m-%d %H:%M:%S"))*1000)
- unifrigoodsbtl1.append(actLtimes1)
- a = i
- for goods in unifriactL1[b]["goodsList"]:
- unifrigoodsidl1.append(goods["goodsId"])
- for goods in unifriactL1[b]["goodsList"]:
- unifripaypril1.append(goods["price"]+"0")
- if re.findall(r"fourNineGoodsList",str(unifrigoodsq1),flags=re.I) != []:
- for i,goods in enumerate(unifrigoodsq1["resdata"]["fourNineGoodsList"],i+1):
- unifrigoodsnl11.append(str(i)+" "+unifristate1.get(goods["state"])+" "+goods["goodsName"])
- unifrigoodsnl1.append(goods["goodsName"])
- for goods in unifrigoodsq1["resdata"]["fourNineGoodsList"]:
- unifrigoodsidl1.append(goods["goodsId"])
- for goods in unifrigoodsq1["resdata"]["fourNineGoodsList"]:
- unifripaypril1.append(goods["price"]+"0")
- unifrigoodsn1 = "\n".join(unifrigoodsnl11)
- print(unifrigoodsq1["msg"]+"\n\n"+unifrigoodsn1)
- self.textBrowser.setText(unifrigoodsq1["msg"]+"\n\n"+unifrigoodsn1)
- self.goods_infos = {‘names’:unifrigoodsnl1,’stauts’:unifrigoodsnl11,’ids’:unifrigoodsidl1,’price’:unifripaypril1,’startTime’:unifrigoodsbtl1}
- self.comboBox.addItems(self.goods_infos[‘names’])
- def gen_order_data(self):
- try:
- index = int(self.comboBox.currentIndex())
- unifrigoodsid1 = self.goods_infos[‘ids’][index]
- unifripaypri1 = self.goods_infos[‘price’][index]
- rechangeno1 = self.lineEdit.text()
- unifrigoodsbt1 = self.goods_infos[‘startTime’][index]
- unifridata1 = ‘reqsn=&reqtime=&cliver=&reqdata={"goodsId":"%s","payWay":"01",\
- "amount":"%s","reChangeNo":"%s","saleTypes":"C","points":"0","beginTime":"%s",\
- "imei":"undefined","sourceChannel":"","proFlag":"","scene":"","pormoterCode":"",\
- "maxcash":"","floortype":"undefined"}’%(unifrigoodsid1,unifripaypri1,rechangeno1,unifrigoodsbt1)
- self.orderData = unifridata1
- self.textBrowser_2.setText(unifridata1)
- except Exception as e:
- print(e)
- self.textBrowser_2.setText(str(e))
- def auto_order(self):
- try:
- self.count = 0
- if self.startOrder == True:
- self.pushButton_2.setText(‘停止’)
- self.order()
- tm = int(self.lineEdit_2.text())
- self.timer.start(tm)
- self.startOrder = False
- else:
- self.pushButton_2.setText(‘开始’)
- self.startOrder = True
- self.timer.stop()
- except:
- try:
- self.count = 0
- if self.startOrder == True:
- self.pushButton_2.setText(‘停止’)
- self.order()
- self.timer.start(5000)
- self.startOrder = False
- else:
- self.pushButton_2.setText(‘开始’)
- self.startOrder = True
- self.timer.stop()
- except Exception as e:
- print(e)
- self.textBrowser_2.setText(str(e))
- self.auto_order()
- def order(self):
- self.count += 1
- self.gen_order_data()
- headers = {"User-Agent":"Mozilla/5.0 (Linux;Android 10;GM1910) AppleWebKit/\
- 537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Mobile Safari/537.36; \
- unicom{version:android@7.0500}"}
- unifriorderj1 = requests.post("https://m.client.10010.com/welfare-mall-front/mobile/api/bj2402/v1",
- headers=headers,params=self.orderData,cookies=self.cookie_dict,
- timeout=3).json()
- unifriorders1 = unifriorderj1["msg"]
- self.textBrowser_2.setText(‘次数:’+str(self.count)+’\n’+unifriorders1)
复制代码
网友cbpdcyy分享:
牛逼了~
网友davidge分享:
软件呢
网友13yaosan分享:
mkj
网友蒋礼貌分享:
?没有下载地址吗
网友红尘娇娃分享:
软件何处有?
网友davidge分享:
软件何处有?
把酒问青天
网友aiyouwei分享:
看不懂表示一脸懵逼的飘过
网友xmaj2008分享:
更新地址了,刚刚忘掉了
网友caz346705931分享:
牛皮
网友pujie1216分享:
其实这些小软件打包成32位通用就行了,64位很浪费而且还可能不通用
网友benyu921分享:
1
推荐:
京东百亿补贴直接领取券链接
网友半寸灰分享: 快14点了 …
TB免答题快抢脚本 只分享一天
网友无奇龙分享: 1.特别提醒…