mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-05-07 03:48:44 +08:00
update
This commit is contained in:
parent
fe74594f7d
commit
dd6b251753
@ -325,7 +325,7 @@ async def main():
|
||||
except IndexError:
|
||||
pin = f'用户{n}'
|
||||
print(f'******开始【京东账号{n}】{pin} *********\n')
|
||||
for n, numbers in enumerate(needinviteNum, 1):
|
||||
for i, numbers in enumerate(needinviteNum, 1):
|
||||
for numbers in needdel:
|
||||
if success >= numbers:
|
||||
print(numbers)
|
||||
|
@ -28,7 +28,7 @@ try:
|
||||
except ImportError as e:
|
||||
print(e)
|
||||
if "No module" in str(e):
|
||||
print("请先运行HarbourJ库依赖一键安装脚本(jd_check_dependent.py),安装jd_sign.so依赖")
|
||||
print("请先运行Faker库依赖一键安装脚本(jd_check_dependent.py),安装jd_sign.so依赖")
|
||||
try:
|
||||
from jdCookie import get_cookies
|
||||
getCk = get_cookies()
|
||||
|
@ -39,8 +39,8 @@ redis_pwd = os.environ.get("redis_pwd") if os.environ.get("redis_pwd") else ""
|
||||
baseInfo = os.environ.get("baseInfo") if os.environ.get("baseInfo") else ""
|
||||
|
||||
if not baseInfo:
|
||||
print('未设置export baseInfo="品牌编号",默认运行第二个任务brand_two')
|
||||
baseInfo = "LM6HIKdH%2Cbrand_two"
|
||||
print('未设置export baseInfo="品牌编号",默认运行第九个任务brand_ten')
|
||||
baseInfo = "8AHIKfsi%2Cbrand_ten"
|
||||
else:
|
||||
if baseInfo == "1":
|
||||
baseInfo = "HXu94GdF%2Cbrand_one"
|
||||
@ -58,8 +58,13 @@ else:
|
||||
baseInfo = "ZRco56US%2Cbrand_seven"
|
||||
elif baseInfo == "8":
|
||||
baseInfo = "4tqyLzac%2Cbrand_eight"
|
||||
elif baseInfo == "9":
|
||||
baseInfo = "PIZ1W0ap%2Cbrand_nine"
|
||||
elif baseInfo == "10":
|
||||
baseInfo = "8AHIKfsi%2Cbrand_ten"
|
||||
else:
|
||||
print('export baseInfo="品牌编号"设置有误,默认运行第二个任务brand_two')
|
||||
print('export baseInfo="品牌编号"设置有误,默认运行第九个任务brand_ten')
|
||||
baseInfo = "8AHIKfsi%2Cbrand_ten"
|
||||
appKey = baseInfo.split('%2C')[0]
|
||||
brand = baseInfo.split('%2C')[1]
|
||||
|
||||
@ -232,7 +237,10 @@ def getUserInfo(authToken):
|
||||
try:
|
||||
code = res['code']
|
||||
is_acvite_complete = res['is_acvite_complete']
|
||||
return code, is_acvite_complete
|
||||
user_click_invite = res['user_click_invite']
|
||||
is_invite_complete = res['is_invite_complete']
|
||||
user_new = res['user_new']
|
||||
return code, is_acvite_complete, user_click_invite, is_invite_complete, user_new
|
||||
except:
|
||||
print(res)
|
||||
|
||||
@ -282,6 +290,145 @@ def inviteFriend(inviter_id, authToken):
|
||||
res = response.json()
|
||||
return res
|
||||
|
||||
def invite(authToken):
|
||||
url = f"https://sjtx-dz.isvjcloud.com/burying/stat?action=invite&source=test&is_share=1"
|
||||
headers = {
|
||||
'Host': 'sjtx-dz.isvjcloud.com',
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'App-Key': appKey,
|
||||
'Authorization': f'Bearer {authToken}',
|
||||
'brand': brand,
|
||||
'Accept-Language': 'zh-CN,zh-Hans;q=0.9',
|
||||
'Accept-Encoding': 'gzip, deflate, br',
|
||||
'Content-Type': 'application/json',
|
||||
'Origin': 'https://sjtx-dz.isvjcloud.com',
|
||||
'User-Agent': ua,
|
||||
'Referer': activityUrl,
|
||||
'Connection': 'keep-alive'
|
||||
}
|
||||
response = requests.request("POST", url, headers=headers)
|
||||
res = response.json()
|
||||
return res
|
||||
|
||||
def inviteFriendNew(inviter_id, authToken):
|
||||
url = "https://sjtx-dz.isvjcloud.com/phone-discount-api/invite_friend_new?source=test&is_share=1"
|
||||
payload = '{"inviter_id":"' + inviter_id + '","channel":2}'
|
||||
headers = {
|
||||
'Host': 'sjtx-dz.isvjcloud.com',
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'App-Key': appKey,
|
||||
'Authorization': f'Bearer {authToken}',
|
||||
'brand': brand,
|
||||
'Accept-Language': 'zh-CN,zh-Hans;q=0.9',
|
||||
'Accept-Encoding': 'gzip, deflate, br',
|
||||
'Content-Type': 'application/json',
|
||||
'Origin': 'https://sjtx-dz.isvjcloud.com',
|
||||
'User-Agent': ua,
|
||||
'Referer': activityUrl,
|
||||
'Connection': 'keep-alive'
|
||||
}
|
||||
response = requests.request("POST", url, headers=headers, data=payload)
|
||||
res = response.json()
|
||||
return res
|
||||
|
||||
def clickHomeGetPrize(authToken):
|
||||
url = f"https://sjtx-dz.isvjcloud.com/burying/stat?action=click_home_get_prize&source=test&is_share=1"
|
||||
headers = {
|
||||
'Host': 'sjtx-dz.isvjcloud.com',
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'App-Key': appKey,
|
||||
'Authorization': f'Bearer {authToken}',
|
||||
'brand': brand,
|
||||
'Accept-Language': 'zh-CN,zh-Hans;q=0.9',
|
||||
'Accept-Encoding': 'gzip, deflate, br',
|
||||
'Content-Type': 'application/json',
|
||||
'Origin': 'https://sjtx-dz.isvjcloud.com',
|
||||
'User-Agent': ua,
|
||||
'Referer': activityUrl,
|
||||
'Connection': 'keep-alive'
|
||||
}
|
||||
response = requests.request("POST", url, headers=headers)
|
||||
res = response.json()
|
||||
return res
|
||||
|
||||
def clickEffectGetPrize(authToken):
|
||||
url = f"https://sjtx-dz.isvjcloud.com/burying/stat?action=click_effect_get_prize&source=test&is_share=1"
|
||||
headers = {
|
||||
'Host': 'sjtx-dz.isvjcloud.com',
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'App-Key': appKey,
|
||||
'Authorization': f'Bearer {authToken}',
|
||||
'brand': brand,
|
||||
'Accept-Language': 'zh-CN,zh-Hans;q=0.9',
|
||||
'Accept-Encoding': 'gzip, deflate, br',
|
||||
'Content-Type': 'application/json',
|
||||
'Origin': 'https://sjtx-dz.isvjcloud.com',
|
||||
'User-Agent': ua,
|
||||
'Referer': activityUrl,
|
||||
'Connection': 'keep-alive'
|
||||
}
|
||||
response = requests.request("POST", url, headers=headers)
|
||||
res = response.json()
|
||||
return res
|
||||
|
||||
def homeSendPrizes(authToken):
|
||||
url = f"https://sjtx-dz.isvjcloud.com/phone-discount-api/home_send_prizes?source=test&is_share=1"
|
||||
headers = {
|
||||
'Host': 'sjtx-dz.isvjcloud.com',
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'App-Key': appKey,
|
||||
'Authorization': f'Bearer {authToken}',
|
||||
'brand': brand,
|
||||
'Accept-Language': 'zh-CN,zh-Hans;q=0.9',
|
||||
'Accept-Encoding': 'gzip, deflate, br',
|
||||
'Content-Type': 'application/json',
|
||||
'Origin': 'https://sjtx-dz.isvjcloud.com',
|
||||
'User-Agent': ua,
|
||||
'Referer': activityUrl,
|
||||
'Connection': 'keep-alive'
|
||||
}
|
||||
response = requests.request("POST", url, headers=headers)
|
||||
res = response.json()
|
||||
return res
|
||||
|
||||
def clickCouponSenPrize(authToken):
|
||||
url = f"https://sjtx-dz.isvjcloud.com/burying/stat?action=click_coupon_send_prize&source=test&is_share=1"
|
||||
headers = {
|
||||
'Host': 'sjtx-dz.isvjcloud.com',
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'App-Key': appKey,
|
||||
'Authorization': f'Bearer {authToken}',
|
||||
'brand': brand,
|
||||
'Accept-Language': 'zh-CN,zh-Hans;q=0.9',
|
||||
'Accept-Encoding': 'gzip, deflate, br',
|
||||
'Content-Type': 'application/json',
|
||||
'Origin': 'https://sjtx-dz.isvjcloud.com',
|
||||
'User-Agent': ua,
|
||||
'Referer': activityUrl,
|
||||
'Connection': 'keep-alive'
|
||||
}
|
||||
response = requests.request("POST", url, headers=headers)
|
||||
res = response.json()
|
||||
return res
|
||||
|
||||
def userClickInvite(authToken):
|
||||
url = f"https://sjtx-dz.isvjcloud.com/phone-discount-api/user_click_invite?source=test&is_share=1"
|
||||
headers = {
|
||||
'Host': 'sjtx-dz.isvjcloud.com',
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'App-Key': appKey,
|
||||
'Authorization': f'Bearer {authToken}',
|
||||
'brand': brand,
|
||||
'Accept-Language': 'zh-CN,zh-Hans;q=0.9',
|
||||
'Accept-Encoding': 'gzip, deflate, br',
|
||||
'Content-Type': 'application/json',
|
||||
'Origin': 'https://sjtx-dz.isvjcloud.com',
|
||||
'User-Agent': ua,
|
||||
'Referer': activityUrl,
|
||||
'Connection': 'keep-alive'
|
||||
}
|
||||
requests.request("POST", url, headers=headers)
|
||||
|
||||
def inviteDrawPrize(invite_type, authToken):
|
||||
url = "https://sjtx-dz.isvjcloud.com/phone-discount-api/invite_draw_prize?source=test&is_share=1"
|
||||
payload = '{"invite_type":' + invite_type + '}'
|
||||
@ -313,16 +460,19 @@ if __name__ == '__main__':
|
||||
except:
|
||||
print("未获取到有效COOKIE,退出程序!")
|
||||
sys.exit()
|
||||
global shareUuid, inviteSuccNum, activityUrl, firstCk
|
||||
global shareUuid, inviteSuccNum, activityUrl, firstCk, allCookies
|
||||
inviteSuccNum = 0
|
||||
try:
|
||||
shareUuid = remote_redis(brand, 1)
|
||||
if not shareUuid:
|
||||
shareUuid = "63ad1171068bd98098"
|
||||
except:
|
||||
shareUuid = "63ad1171068bd98098"
|
||||
activityUrl = f"https://sjtx-dz.isvjcloud.com/phone_discount/?invite_id={shareUuid}&source=test&baseInfo={baseInfo}"
|
||||
allCookies = cks
|
||||
|
||||
num = 0
|
||||
for cookie in cks[:]:
|
||||
for cookie in allCookies:
|
||||
num += 1
|
||||
if num == 1:
|
||||
firstCk = cookie
|
||||
@ -355,8 +505,11 @@ if __name__ == '__main__':
|
||||
authToken = getAuth()
|
||||
if not authToken:
|
||||
if num == 1:
|
||||
print("‼️车头为火爆号,换车头重新运行!")
|
||||
sys.exit()
|
||||
else:
|
||||
print("📝移除火爆账号")
|
||||
allCKs.remove()
|
||||
time.sleep(1.5)
|
||||
continue
|
||||
time.sleep(0.2)
|
||||
@ -368,7 +521,9 @@ if __name__ == '__main__':
|
||||
time.sleep(1.5)
|
||||
continue
|
||||
shareUuid1 = userInfo[0]
|
||||
print(f"🤖助力码: {shareUuid1}")
|
||||
is_acvite_complete = userInfo[1]
|
||||
user_new = userInfo[4]
|
||||
time.sleep(0.2)
|
||||
if num == 1:
|
||||
inviteSuccNum = len(getFriendList(authToken))
|
||||
@ -378,13 +533,66 @@ if __name__ == '__main__':
|
||||
invite_type = i + 1
|
||||
print(f"开始第{invite_type}次抽奖")
|
||||
drawPrize = inviteDrawPrize(str(invite_type), authToken)
|
||||
try:
|
||||
if "prize_info" not in drawPrize:
|
||||
print(drawPrize['message'])
|
||||
else:
|
||||
prize_info = f"{drawPrize['prize_info']['user_prize']['prize_name']} {drawPrize['prize_info']['user_prize']['prize_info']['quota']}"
|
||||
print(f"🎁抽奖获得:{prize_info}")
|
||||
except:
|
||||
print(f"抽奖结果: {drawPrize}")
|
||||
sys.exit()
|
||||
time.sleep(0.2)
|
||||
if user_new == 1: # 新用户
|
||||
invite(authToken)
|
||||
time.sleep(0.2)
|
||||
inviteNewInfo = inviteFriendNew(shareUuid, authToken)
|
||||
if "prize_info" in inviteNewInfo:
|
||||
prize_info = [f"{x['user_prize']['prize_name']}{x['user_prize']['prize_info']['quota']}个" for x in inviteNewInfo['prize_info']]
|
||||
if prize_info:
|
||||
print(f"🎁获得{','.join(prize_info)}")
|
||||
else:
|
||||
print("来晚了没水了💨💨💨")
|
||||
inviteSuccNum += 1
|
||||
print(f"🎉助力成功!已邀请{inviteSuccNum}人")
|
||||
else:
|
||||
print(inviteNewInfo['message'])
|
||||
clickHomeGetPrize(authToken)
|
||||
time.sleep(0.2)
|
||||
clickEffectGetPrize(authToken)
|
||||
time.sleep(0.2)
|
||||
homePrizes = homeSendPrizes(authToken)
|
||||
if "prize_info" in homePrizes:
|
||||
prize_info = [f"{x['user_prize']['prize_name']}{x['user_prize']['prize_info']['quota']}个" for x in homePrizes['prize_info']]
|
||||
print(f"🎁获得{','.join(prize_info)}")
|
||||
else:
|
||||
print(homePrizes)
|
||||
time.sleep(0.2)
|
||||
userClickInvite(authToken)
|
||||
|
||||
if inviteSuccNum >= 10:
|
||||
token = getToken(firstCk, r)
|
||||
time.sleep(0.2)
|
||||
getActivity()
|
||||
time.sleep(0.2)
|
||||
authToken0 = getAuth()
|
||||
time.sleep(0.2)
|
||||
getUserInfo(authToken0)
|
||||
time.sleep(0.2)
|
||||
for i in range(2):
|
||||
invite_type = i + 1
|
||||
print(f"开始第{invite_type}次抽奖")
|
||||
drawPrize0 = inviteDrawPrize(str(invite_type), authToken0)
|
||||
try:
|
||||
if "prize_info" not in drawPrize0:
|
||||
print(drawPrize0['message'])
|
||||
else:
|
||||
prize_info = f"{drawPrize0['prize_info']['user_prize']['prize_name']}{drawPrize0['prize_info']['user_prize']['prize_info']['quota']}"
|
||||
print(f"🎁抽奖获得:{prize_info}")
|
||||
except:
|
||||
print(drawPrize0)
|
||||
sys.exit()
|
||||
else:
|
||||
inviteInfo = inviteFriend(shareUuid, authToken)
|
||||
if "prize_info" not in inviteInfo:
|
||||
print(inviteInfo['message'])
|
||||
@ -407,11 +615,14 @@ if __name__ == '__main__':
|
||||
invite_type = i + 1
|
||||
print(f"开始第{invite_type}次抽奖")
|
||||
drawPrize0 = inviteDrawPrize(str(invite_type), authToken0)
|
||||
try:
|
||||
if "prize_info" not in drawPrize0:
|
||||
print(drawPrize0['message'])
|
||||
else:
|
||||
prize_info = f"{drawPrize0['prize_info']['user_prize']['prize_name']}{drawPrize0['prize_info']['user_prize']['prize_info']['quota']}"
|
||||
print(f"🎁抽奖获得:{prize_info}")
|
||||
except:
|
||||
print(drawPrize0)
|
||||
sys.exit()
|
||||
else:
|
||||
inviteSuccNum += 1
|
||||
@ -431,11 +642,14 @@ if __name__ == '__main__':
|
||||
invite_type = i + 1
|
||||
print(f"开始第{invite_type}次抽奖")
|
||||
drawPrize0 = inviteDrawPrize(str(invite_type), authToken0)
|
||||
try:
|
||||
if "prize_info" not in drawPrize0:
|
||||
print(drawPrize0['message'])
|
||||
else:
|
||||
prize_info = f"{drawPrize0['prize_info']['user_prize']['prize_name']}{drawPrize0['prize_info']['user_prize']['prize_info']['quota']}"
|
||||
print(f"🎁抽奖获得:{prize_info}")
|
||||
except:
|
||||
print(drawPrize0)
|
||||
sys.exit()
|
||||
if num == 1:
|
||||
shareUuid = shareUuid1
|
||||
|
@ -26,7 +26,7 @@ try:
|
||||
except ImportError as e:
|
||||
print(e)
|
||||
if "No module" in str(e):
|
||||
print("请先运行HarbourJ库依赖一键安装脚本(jd_check_dependent.py),安装jd_sign.so依赖")
|
||||
print("请先运行Faker库依赖一键安装脚本(jd_check_dependent.py),安装jd_sign.so依赖")
|
||||
sys.exit()
|
||||
try:
|
||||
from jdCookie import get_cookies
|
||||
|
Loading…
Reference in New Issue
Block a user