Skip to content

Commit

Permalink
选座前增加请求座位表,减小被检测概率
Browse files Browse the repository at this point in the history
  • Loading branch information
xindongzetong committed Oct 15, 2024
1 parent 402e78e commit 6502eab
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 14 deletions.
12 changes: 4 additions & 8 deletions check.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@
class Check:
SERVERID = ['82967fec9605fac9a28c437e2a3ef1a4', 'b9fc7bd86d2eed91b23d7347e0ee995e',
'e3fa93b0fb9e2e6d4f53273540d4e924', 'd3936289adfff6c3874a2579058ac651']
headers = {'Host': 'wechat.v2.traceint.com', 'Connection': 'keep-alive', 'Origin': 'http://tuia.sensezeal.com',
'User-Agent': 'Mozilla/5.0 (Linux; Android 11; M2012K11AC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 '
'(KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3149 MMWEBSDK/20211001 Mobile '
'Safari/537.36 MMWEBID/68 MicroMessenger/8.0.16.2040(0x28001053) Process/toolsmp '
'WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64',
'Content-Type': 'application/json', 'Accept': '*/*',
'Referer': 'http://tuia.sensezeal.com/', 'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7'}
headers = {'Host': 'wechat.v2.traceint.com', 'Connection': 'keep-alive', 'App-Version': '2.1.5',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/81.0.4044.138 Safari/537.36 NetType/WIFI MicroMessenger/7.0.20.1781(0x6700143B) '
'WindowsWechat(0x6307001e)', 'Content-Type': 'application/json', 'Accept': '*/*'}
list_body = {"operationName": "getList",
"query": "query getList {\n userAuth {\n credit {\n tasks {\n id\n task_id\n task_name\n task_info\n "
"task_url\n credit_num\n contents\n conditions\n task_type\n status\n }\n staticTasks "
Expand Down
2 changes: 1 addition & 1 deletion hold.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class Hold:
SERVERID = ['82967fec9605fac9a28c437e2a3ef1a4', 'b9fc7bd86d2eed91b23d7347e0ee995e',
'e3fa93b0fb9e2e6d4f53273540d4e924', 'd3936289adfff6c3874a2579058ac651']
headers = {'Host': 'wechat.v2.traceint.com', 'Connection': 'keep-alive', 'App-Version': '2.0.14',
headers = {'Host': 'wechat.v2.traceint.com', 'Connection': 'keep-alive', 'App-Version': '2.1.5',
'Origin': 'https://web.traceint.com',
'User-Agent': 'Mozilla/5.0 (Linux; Android 11; M2012K11AC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 '
'(KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3149 MMWEBSDK/20211001 Mobile '
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,6 @@ def process_withdraw():
client.set('start', '00:00')
client.set('numbers', '1')
client.set('withdraw', '00:00')
scheduler.add_job(id='cookie_task', func=utils.cookie_task, trigger='interval', minutes=2)
scheduler.add_job(id='cookie_task', func=utils.cookie_task, trigger='interval', minutes=7)
config(title='我去图书馆选座', theme='yeti')
start_server(index, port=80, cdn=False)
2 changes: 1 addition & 1 deletion prereserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class Prereserve:
SERVERID = ['82967fec9605fac9a28c437e2a3ef1a4', 'b9fc7bd86d2eed91b23d7347e0ee995e',
'e3fa93b0fb9e2e6d4f53273540d4e924', 'd3936289adfff6c3874a2579058ac651']
headers = {'Host': 'wechat.v2.traceint.com', 'Connection': 'keep-alive', 'App-Version': '2.1.2.p1',
headers = {'Host': 'wechat.v2.traceint.com', 'Connection': 'keep-alive', 'App-Version': '2.1.5',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/81.0.4044.138 Safari/537.36 NetType/WIFI MicroMessenger/7.0.20.1781(0x6700143B) '
'WindowsWechat(0x6307001e)', 'Content-Type': 'application/json', 'Accept': '*/*'}
Expand Down
15 changes: 13 additions & 2 deletions reserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@
class Reserve:
SERVERID = ['82967fec9605fac9a28c437e2a3ef1a4', 'b9fc7bd86d2eed91b23d7347e0ee995e',
'e3fa93b0fb9e2e6d4f53273540d4e924', 'd3936289adfff6c3874a2579058ac651']
headers = {'Host': 'wechat.v2.traceint.com', 'Connection': 'keep-alive', 'App-Version': '2.1.2.p1',
headers = {'Host': 'wechat.v2.traceint.com', 'Connection': 'keep-alive', 'App-Version': '2.1.5',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/81.0.4044.138 Safari/537.36 NetType/WIFI MicroMessenger/7.0.20.1781(0x6700143B) '
'WindowsWechat(0x6307001e)', 'Content-Type': 'application/json', 'Accept': '*/*'}
lib_body = {"operationName": "libLayout",
"query": "query libLayout($libId: Int, $libType: Int) {\n userAuth {\n reserve {\n libs(libType: "
"$libType, libId: $libId) {\n lib_id\n is_open\n lib_floor\n lib_name\n lib_type\n "
"lib_layout {\n seats_total\n seats_booking\n seats_used\n max_x\n max_y\n seats "
"{\n x\n y\n key\n type\n name\n seat_status\n status\n }\n }\n }\n }\n }\n}",
"variables": {"libId": 0}}
reserve_body = {"operationName": "reserueSeat",
"query": "mutation reserueSeat($libId: Int!, $seatKey: String!, $captchaCode: String, $captcha: String!) {\n userAuth {\n reserve {\n reserueSeat(\n libId: $libId\n seatKey: $seatKey\n captchaCode: $captchaCode\n captcha: $captcha\n )\n }\n }\n}",
"query": "mutation reserueSeat($libId: Int!, $seatKey: String!, $captchaCode: String, $captcha: "
"String!) {\n userAuth {\n reserve {\n reserueSeat(\n libId: $libId\n seatKey: "
"$seatKey\n captchaCode: $captchaCode\n captcha: $captcha\n )\n }\n }\n}",
"variables": {"captchaCode": "", "captcha": ""}}

def __init__(self, cookie):
Expand All @@ -22,6 +30,9 @@ def __init__(self, cookie):

def choose_seat(self, floor, seat):
try:
self.lib_body['variables']['libId'] = int(floor)
requests.post("https://wechat.v2.traceint.com/index.php/graphql/", json=self.lib_body,
headers=self.headers).json()
self.reserve_body['variables']['libId'] = int(floor)
self.reserve_body['variables']['seatKey'] = seat
msg = requests.post("https://wechat.v2.traceint.com/index.php/graphql/", json=self.reserve_body,
Expand Down
2 changes: 1 addition & 1 deletion withdraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class Withdraw:
SERVERID = ['82967fec9605fac9a28c437e2a3ef1a4', 'b9fc7bd86d2eed91b23d7347e0ee995e',
'e3fa93b0fb9e2e6d4f53273540d4e924', 'd3936289adfff6c3874a2579058ac651']
headers = {'Host': 'wechat.v2.traceint.com', 'Connection': 'keep-alive', 'App-Version': '2.0.14', 'Origin': 'https://web.traceint.com',
headers = {'Host': 'wechat.v2.traceint.com', 'Connection': 'keep-alive', 'App-Version': '2.1.5', 'Origin': 'https://web.traceint.com',
'User-Agent': 'Mozilla/5.0 (Linux; Android 11; M2012K11AC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 '
'(KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3149 MMWEBSDK/20211001 Mobile '
'Safari/537.36 MMWEBID/68 MicroMessenger/8.0.16.2040(0x28001053) Process/toolsmp '
Expand Down

0 comments on commit 6502eab

Please sign in to comment.