mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-04-23 02:48:44 +08:00
update
This commit is contained in:
parent
b7b478151c
commit
e7a2ed8923
21
jd_cjhy_daily.js
Normal file
21
jd_cjhy_daily.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
10
jd_dpqd.js
10
jd_dpqd.js
@ -51,20 +51,10 @@ if ($.isNode()) {
|
||||
token = [
|
||||
"ED926C4D8074BD71C0156FA6DFDAD549",
|
||||
"CDE42328CFCB396AF93D28520AE10A72",
|
||||
"F85E04D01415868AB0790FDBC3409F10",
|
||||
"BE344132A1D52C6C62F4185701742ED5",
|
||||
"457A7673CBB0BA0841DC6E898CB2E282",
|
||||
"1D911DAB0865E026F3B42C4C3ABA539D",
|
||||
"6E866708B29EB404975EF6692F2B77D6",
|
||||
"F8771E215FB565AC5CB001AD68870BFA",
|
||||
"E92431BDF2EE7E630C48B4FB1E440427",
|
||||
"4450A38980C609B19E769F268AF8FD93",
|
||||
"7A43D1847847DD1857A2BA1F27FBF638",
|
||||
"9CC69A0B1C0275CB27FFF3C8BEE5C2F8",
|
||||
"E74CB03E861577B0915630B8328B6AEE",
|
||||
"6F3D36AA7BB0A880FB8926154995BB9A",
|
||||
"B70A83AD9737E1B3DD78FC1A69F35323",
|
||||
"8B4296C509D8FC3BFAA3967B3DF0B3DC",
|
||||
"0CE352C49E77D6354F8F12DD5D6745ED"
|
||||
];
|
||||
|
||||
|
92
jd_goldCenter.py
Normal file
92
jd_goldCenter.py
Normal file
@ -0,0 +1,92 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
File: jd_goldCenter.py(京东金榜签到)
|
||||
Author: HarbourJ
|
||||
Date: 2022/9/19 22:00
|
||||
TG: https://t.me/HarbourToulu
|
||||
TgChat: https://t.me/HarbourSailing
|
||||
cron: 30 0 0 * * *
|
||||
new Env('京东金榜签到');
|
||||
ActivityEntry: https://u.jd.com/XwcRPWF
|
||||
"""
|
||||
|
||||
import requests, sys, os, re, time
|
||||
from datetime import datetime
|
||||
from urllib.parse import quote_plus, unquote_plus
|
||||
from functools import partial
|
||||
print = partial(print, flush=True)
|
||||
import warnings
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
|
||||
from jd_sign import *
|
||||
try:
|
||||
from jdCookie import get_cookies
|
||||
getCk = get_cookies()
|
||||
except:
|
||||
print("请先下载依赖脚本,\n下载链接: https://raw.githubusercontent.com/HarbourJ/HarbourToulu/main/jdCookie.py")
|
||||
sys.exit(3)
|
||||
|
||||
def randomString(e, flag=False):
|
||||
t = "0123456789abcdef"
|
||||
if flag: t = t.upper()
|
||||
n = [random.choice(t) for _ in range(e)]
|
||||
return ''.join(n)
|
||||
|
||||
def doTask(cookie):
|
||||
url = "https://api.m.jd.com/client.action"
|
||||
payload = f"functionId=goldCenterDoTask&body=%7B%22type%22%3A1%2C%22log%22%3A%221663608760605~1vIYistq46XMDFpdU1QRjAxMQ%3D%3D.WEN7Y3BZTXpldV1FeC4XMQF7aAxfLH1jOFhZe3xyRUczYjhYCzM%3D.3a9b2837~4%2C2~FAFBE710E8FEA122D0657597CB2CD59B1C29CEEB1CA2595AF7A141BC2B50DB3D~13sicf0~C~ShVFXRsCaBFUAhkHah15ABwIYHwfURhAExQTUwcdD2kffmAYBWgKHVYdRBsUEVcGGQJ%2FFHwGHQFgbR9SHEAWbBQTQ19dGwJoEVQBGQRwHXZ3HAxvZR9RGEATFBNTBh0McB9ydhgBa3QdVh1EGxQRVwEZAXkUcHAdBggIH0YcQBZsFBNQQ14bAgIfEkdHEwITBgcGCg4DCwcBBgkKCAQEAwAaHxFHUVATAhNDRURNTFVGVhYYE09UVhMKG15VR0RAQERZExsTQF1WEQlrBQUdCQQOAxwIFAsfARgBbBQTXVsSAwkfEVNHFgsaUwQHBFoNAwMDDFAFCQcCVAQIXVcHBlUAVF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ersion=11.1.4&client=wh5&d_model=iPhone13%2C2&build=168210&ext=%7B%22prstate%22%3A%220%22%7D&uuid={randomString(40)}&area=00_0000_0000_00000&joycious=56&rfs=0000"
|
||||
headers = {
|
||||
'Host': 'api.m.jd.com',
|
||||
'Accept': '*/*',
|
||||
'Accept-Language': 'zh-CN,zh-Hans;q=0.9',
|
||||
'Accept-Encoding': 'gzip, deflate, br',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'Origin': 'https://h5.m.jd.com',
|
||||
'User-Agent': ua,
|
||||
'Connection': 'keep-alive',
|
||||
'Referer': 'https://h5.m.jd.com/',
|
||||
'request-from': 'native',
|
||||
'Cookie': cookie
|
||||
}
|
||||
response = requests.request("POST", url, headers=headers, data=payload)
|
||||
res = response.json()
|
||||
if res['isSuccess']:
|
||||
result = res['result']
|
||||
if "任务已完成" == result['taskMsg']:
|
||||
print("已经领过了,明天再来")
|
||||
elif "响应成功" == result['taskMsg']:
|
||||
if "lotteryScore" in str(result):
|
||||
print(f"🎉获得{result['lotteryScore']}豆")
|
||||
else:
|
||||
print(f"获得💨💨💨")
|
||||
else:
|
||||
print(res)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
cks = getCk
|
||||
if not cks:
|
||||
sys.exit()
|
||||
except:
|
||||
print("未获取到有效COOKIE,退出程序!")
|
||||
sys.exit()
|
||||
num = 0
|
||||
for cookie in cks[:]:
|
||||
num += 1
|
||||
global ua
|
||||
ua = userAgent()
|
||||
try:
|
||||
pt_pin = re.compile(r'pt_pin=(.*?);').findall(cookie)[0]
|
||||
pt_pin = unquote_plus(pt_pin)
|
||||
except IndexError:
|
||||
pt_pin = f'用户{num}'
|
||||
print(f'\n******开始【京东账号{num}】{pt_pin} *********\n')
|
||||
print(datetime.now())
|
||||
doTask(cookie)
|
||||
time.sleep(2)
|
||||
|
||||
|
||||
|
@ -8,40 +8,40 @@ Date: 2022/8/1 22:37
|
||||
TG: https://t.me/HarbourToulu
|
||||
cron: 1 1 1 1 1 1
|
||||
new Env('jinggeng邀请入会有礼');
|
||||
活动入口: https://jinggeng-isv.isvjcloud.com/ql/front/showInviteJoin?id=9e80809282a4bdc90182ab254c7e0a12&user_id=1000121005&inviterNick=Ny0m1K1tVHIJvt0j4SQ9RbRPXMHHf%2BDrNmMVfT8S5hq3SjYMAACrbEHZQ40J5yPY
|
||||
变量设置: export redis_url="redis_ip", export redis_pwd="xxx"(没有可写变量)
|
||||
活动入口: https://jinggeng-isv.isvjcloud.com/ql/front/showInviteJoin?id=9e80809282a4bdc90182ab254c7e0a12&user_id=1000121005
|
||||
变量设置: export redis_url="xxx", export redis_port="xxx"(没有可省略), export redis_pwd="xxx"(没有可省略)
|
||||
export jinggengInviteJoin="9e80809282a4bdc90182ab254c7e0a12&1000121005"(活动id&店铺id)
|
||||
"""
|
||||
|
||||
import time
|
||||
import requests
|
||||
import sys
|
||||
import re
|
||||
import os
|
||||
import time, requests, sys, re, os, json, random
|
||||
from bs4 import BeautifulSoup
|
||||
from datetime import datetime
|
||||
import json
|
||||
import random
|
||||
from urllib.parse import quote_plus, unquote_plus
|
||||
from functools import partial
|
||||
print = partial(print, flush=True)
|
||||
import warnings
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
|
||||
try:
|
||||
from jd_sign import *
|
||||
except ImportError as e:
|
||||
print(e)
|
||||
if "No module" in str(e):
|
||||
print("请先运行HarbourJ库依赖一键安装脚本(jd_check_dependent.py),安装jd_sign.so依赖")
|
||||
try:
|
||||
from jdCookie import get_cookies
|
||||
getCk = get_cookies()
|
||||
except:
|
||||
print("请先下载依赖脚本,\n下载链接: https://raw.githubusercontent.com/shufflewzc/faker2/main/jdCookie.py")
|
||||
print("请先下载依赖脚本,\n下载链接: https://raw.githubusercontent.com/HarbourJ/HarbourToulu/main/jdCookie.py")
|
||||
sys.exit(3)
|
||||
redis_url = os.environ.get("redis_url") if os.environ.get("redis_url") else "172.17.0.1"
|
||||
redis_port = os.environ.get("redis_port") if os.environ.get("redis_port") else "6379"
|
||||
redis_pwd = os.environ.get("redis_pwd") if os.environ.get("redis_pwd") else ""
|
||||
jinggengInviteJoin = os.environ.get("jinggengInviteJoin") if os.environ.get("jinggengInviteJoin") else ""
|
||||
|
||||
inviterNicks = [
|
||||
"Ny0m1K1tVHIJvt0j4SQ9RbRPXMHHf%2BDrNmMVfT8S5hq3SjYMAACrbEHZQ40J5yPY",
|
||||
"pWGUWZJQ3actex0X2vQyLsjNhNaYFy2HteErE6izlhTf9nrGY7gBkCdGU4C6z%2FxD"
|
||||
"pWGUWZJQ3actex0X2vQyLsjNhNaYFy2HteErE6izlhTf9nrGY7gBkCdGU4C6z%2FxD",
|
||||
"3TQTImsIN0s9T85f1wS70V4tLNYA4seuA67MOIYQxEk3Vl9%2BAVo4NF%2BtgyeIc6A6kdK3rLBQpEQH9V4tdrrh0w%3D%3D"
|
||||
]
|
||||
if "&" not in jinggengInviteJoin:
|
||||
print("⚠️jinggengInviteJoin变量有误!退出程序!")
|
||||
@ -50,13 +50,13 @@ ac_id = jinggengInviteJoin.split("&")[0]
|
||||
user_id = jinggengInviteJoin.split("&")[1]
|
||||
inviterNick = random.choice(inviterNicks)
|
||||
activity_url = f"https://jinggeng-isv.isvjcloud.com/ql/front/showInviteJoin?id={ac_id}&user_id={user_id}&inviterNick={inviterNick}"
|
||||
print(f"【🛳活动入口】{activity_url}")
|
||||
print(f"【🛳活动入口】https://jinggeng-isv.isvjcloud.com/ql/front/showInviteJoin?id={ac_id}&user_id={user_id}")
|
||||
|
||||
def redis_conn():
|
||||
try:
|
||||
import redis
|
||||
try:
|
||||
pool = redis.ConnectionPool(host=redis_url, port=6379, decode_responses=True, socket_connect_timeout=5, password=redis_pwd)
|
||||
pool = redis.ConnectionPool(host=redis_url, port=redis_port, decode_responses=True, socket_connect_timeout=5, password=redis_pwd)
|
||||
r = redis.Redis(connection_pool=pool)
|
||||
r.get('conn_test')
|
||||
print('✅redis连接成功')
|
||||
@ -72,16 +72,15 @@ def getToken(ck, r=None):
|
||||
pt_pin = unquote_plus(re.compile(r'pt_pin=(.*?);').findall(ck)[0])
|
||||
except:
|
||||
# redis缓存Token 活动域名+ck前7位(获取pin失败)
|
||||
pt_pin = ck[:8]
|
||||
pt_pin = ck[:15]
|
||||
try:
|
||||
if r is not None:
|
||||
Token = r.get(f'{activityUrl.split("https://")[1].split("-")[0]}_{pt_pin}')
|
||||
# print("Token过期时间", r.ttl(f'{activityUrl.split("https://")[1].split("-")[0]}_{pt_pin}'))
|
||||
if Token is not None:
|
||||
print(f"♻️获取缓存Token->: {Token}")
|
||||
print(f"♻️获取缓存Token")
|
||||
return Token
|
||||
else:
|
||||
print("🈳去设置Token缓存-->")
|
||||
s.headers = {
|
||||
'Connection': 'keep-alive',
|
||||
'Accept-Encoding': 'gzip, deflate, br',
|
||||
@ -103,11 +102,10 @@ def getToken(ck, r=None):
|
||||
if "参数异常" in f.text:
|
||||
return
|
||||
Token_new = f.json()['token']
|
||||
print(f"Token->: {Token_new}")
|
||||
if r.set(f'{activityUrl.split("https://")[1].split("-")[0]}_{pt_pin}', Token_new, ex=1800):
|
||||
print("✅Token缓存设置成功")
|
||||
print("✅Token缓存成功")
|
||||
else:
|
||||
print("❌Token缓存设置失败")
|
||||
print("❌Token缓存失败")
|
||||
return Token_new
|
||||
else:
|
||||
s.headers = {
|
||||
@ -131,7 +129,7 @@ def getToken(ck, r=None):
|
||||
if "参数异常" in f.text:
|
||||
return
|
||||
Token = f.json()['token']
|
||||
print(f"Token->: {Token}")
|
||||
print(f"✅获取实时Token")
|
||||
return Token
|
||||
except:
|
||||
return
|
||||
@ -461,6 +459,7 @@ if __name__ == '__main__':
|
||||
for i, needNum0 in enumerate(needInviteNums):
|
||||
needNum = needNum0[0]
|
||||
awardId = needNum0[1]
|
||||
equityType = needNum0[2]
|
||||
if inviteSuccNums >= needNum:
|
||||
print(f"🎉恭喜已完成第{i + 1}档邀请,快去领奖吧!")
|
||||
time.sleep(1)
|
||||
@ -521,7 +520,6 @@ if __name__ == '__main__':
|
||||
inviteSuccNums += 1
|
||||
print(f"🛳已经邀请{inviteSuccNums}人")
|
||||
for i, needNum1 in enumerate(needInviteNums):
|
||||
# print(i, needNum1)
|
||||
needNum = needNum1[0]
|
||||
awardId = needNum1[1]
|
||||
equityType = needNum1[2]
|
||||
|
21
jd_lzkj_daily.js
Normal file
21
jd_lzkj_daily.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6
magic.py
6
magic.py
@ -198,13 +198,13 @@ async def get_activity_info(text):
|
||||
return activity_id, url
|
||||
|
||||
|
||||
@client.on(events.NewMessage(chats=monitor_cars, pattern=r'((export\s)?\w*=(".*"|\'.*\')|[/ikun])'))
|
||||
@client.on(events.NewMessage(chats=monitor_cars, pattern=r'(([\s\S]*)export\s?\w*=(".*"|\'.*\')([\s\S]*)|[/ikun])'))
|
||||
async def handler(event):
|
||||
origin = event.message.text
|
||||
text = re.findall(r'https://i.walle.com/api\?data=(.+)?\)', origin)
|
||||
if len(text) > 0:
|
||||
text = parse.unquote_plus(text[0])
|
||||
elif origin.startswith("export "):
|
||||
elif "export" in origin:
|
||||
text = origin
|
||||
else:
|
||||
return
|
||||
@ -265,7 +265,7 @@ async def handler(event):
|
||||
|
||||
|
||||
async def converter_handler(text):
|
||||
text = text.replace("`", "")
|
||||
text = "\n".join(list(filter(lambda x: "export " in x, text.replace("`", "").split("\n"))))
|
||||
for c_w_key in monitor_converters_whitelist_keywords:
|
||||
result = re.search(c_w_key, text)
|
||||
if result is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user