1+ [
2+ {
3+ "comment" : " 发起签到请求" ,
4+ "request" : {
5+ "method" : " POST" ,
6+ "url" : " https://2libra.com/api/sign" ,
7+ "headers" : [
8+ {
9+ "name" : " User-Agent" ,
10+ "value" : " Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:147.0) Gecko/20100101 Firefox/147.0"
11+ },
12+ {
13+ "name" : " Accept" ,
14+ "value" : " application/json, text/plain, */*"
15+ },
16+ {
17+ "name" : " Accept-Language" ,
18+ "value" : " zh,zh-CN;q=0.9,en-US;q=0.8"
19+ },
20+ {
21+ "name" : " Accept-Encoding" ,
22+ "value" : " gzip, deflate, br, zstd"
23+ },
24+ {
25+ "name" : " Referer" ,
26+ "value" : " https://2libra.com/"
27+ },
28+ {
29+ "name" : " Origin" ,
30+ "value" : " https://2libra.com"
31+ },
32+ {
33+ "name" : " Sec-GPC" ,
34+ "value" : " 1"
35+ },
36+ {
37+ "name" : " Sec-Fetch-Dest" ,
38+ "value" : " empty"
39+ },
40+ {
41+ "name" : " Sec-Fetch-Mode" ,
42+ "value" : " cors"
43+ },
44+ {
45+ "name" : " Sec-Fetch-Site" ,
46+ "value" : " same-origin"
47+ },
48+ {
49+ "name" : " Connection" ,
50+ "value" : " keep-alive"
51+ },
52+ {
53+ "name" : " Cookie" ,
54+ "value" : " {{cookie}}"
55+ },
56+ {
57+ "name" : " TE" ,
58+ "value" : " trailers"
59+ },
60+ {
61+ "name" : " Authorization" ,
62+ "value" : " {{Authorization}}"
63+ }
64+ ],
65+ "cookies" : []
66+ },
67+ "rule" : {
68+ "success_asserts" : [
69+ {
70+ "re" : " 201" ,
71+ "from" : " status"
72+ },
73+ {
74+ "re" : " 你今天已经签到过了" ,
75+ "from" : " content"
76+ }
77+ ],
78+ "failed_asserts" : [],
79+ "extract_variables" : [
80+ {
81+ "name" : " m" ,
82+ "re" : " (?<=\" m\" :\" ).*?(?=\" )" ,
83+ "from" : " content"
84+ },
85+ {
86+ "name" : " sign_coins" ,
87+ "re" : " (?<=\" coins\" :)\\ d+(?=[,}])" ,
88+ "from" : " content"
89+ }
90+ ]
91+ }
92+ },
93+ {
94+ "comment" : " 查询账户信息" ,
95+ "request" : {
96+ "method" : " GET" ,
97+ "url" : " https://2libra.com/api/users/info?fields=info%2Cexp%2Ccoins" ,
98+ "headers" : [
99+ {
100+ "name" : " Host" ,
101+ "value" : " 2libra.com"
102+ },
103+ {
104+ "name" : " User-Agent" ,
105+ "value" : " Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:147.0) Gecko/20100101 Firefox/147.0"
106+ },
107+ {
108+ "name" : " Accept" ,
109+ "value" : " application/json, text/plain, */*"
110+ },
111+ {
112+ "name" : " Accept-Language" ,
113+ "value" : " zh,zh-CN;q=0.9,en-US;q=0.8"
114+ },
115+ {
116+ "name" : " Accept-Encoding" ,
117+ "value" : " gzip, deflate, br, zstd"
118+ },
119+ {
120+ "name" : " Referer" ,
121+ "value" : " https://2libra.com/"
122+ },
123+ {
124+ "name" : " Sec-GPC" ,
125+ "value" : " 1"
126+ },
127+ {
128+ "name" : " Sec-Fetch-Dest" ,
129+ "value" : " empty"
130+ },
131+ {
132+ "name" : " Sec-Fetch-Mode" ,
133+ "value" : " cors"
134+ },
135+ {
136+ "name" : " Sec-Fetch-Site" ,
137+ "value" : " same-origin"
138+ },
139+ {
140+ "name" : " Connection" ,
141+ "value" : " keep-alive"
142+ },
143+ {
144+ "name" : " Cookie" ,
145+ "value" : " {{cookie}}"
146+ },
147+ {
148+ "name" : " Authorization" ,
149+ "value" : " {{Authorization}}"
150+ }
151+ ],
152+ "cookies" : []
153+ },
154+ "rule" : {
155+ "success_asserts" : [
156+ {
157+ "re" : " 200" ,
158+ "from" : " status"
159+ }
160+ ],
161+ "failed_asserts" : [],
162+ "extract_variables" : [
163+ {
164+ "name" : " username" ,
165+ "re" : " (?<=\" username\" :\" ).*?(?=\" )" ,
166+ "from" : " content"
167+ },
168+ {
169+ "name" : " user_number" ,
170+ "re" : " (?<=\" user_number\" :\" ).*?(?=\" )" ,
171+ "from" : " content"
172+ },
173+ {
174+ "name" : " currentExp" ,
175+ "re" : " (?<=\" currentExp\" :)\\ d+(?=[,}])" ,
176+ "from" : " content"
177+ },
178+ {
179+ "name" : " nextLevelExp" ,
180+ "re" : " (?<=\" nextLevelExp\" :)\\ d+(?=[,}])" ,
181+ "from" : " content"
182+ },
183+ {
184+ "name" : " expToNext" ,
185+ "re" : " (?<=\" expToNext\" :)\\ d+(?=[,}])" ,
186+ "from" : " content"
187+ },
188+ {
189+ "name" : " balance" ,
190+ "re" : " (?<=\" coins\" :)\\ d+(?=[,}])" ,
191+ "from" : " content"
192+ },
193+ {
194+ "name" : " level" ,
195+ "re" : " (?<=\" exp\" :\\ {\" level\" :)\\ d+(?=[,}])" ,
196+ "from" : " content"
197+ }
198+ ]
199+ }
200+ },
201+ {
202+ "request" : {
203+ "method" : " GET" ,
204+ "url" : " https://2libra.com/api/sign/stats" ,
205+ "headers" : [
206+ {
207+ "name" : " User-Agent" ,
208+ "value" : " Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:147.0) Gecko/20100101 Firefox/147.0"
209+ },
210+ {
211+ "name" : " Accept" ,
212+ "value" : " application/json, text/plain, */*"
213+ },
214+ {
215+ "name" : " Accept-Language" ,
216+ "value" : " zh,zh-CN;q=0.9,en-US;q=0.8"
217+ },
218+ {
219+ "name" : " Accept-Encoding" ,
220+ "value" : " gzip, deflate, br, zstd"
221+ },
222+ {
223+ "name" : " Referer" ,
224+ "value" : " https://2libra.com/"
225+ },
226+ {
227+ "name" : " Sec-GPC" ,
228+ "value" : " 1"
229+ },
230+ {
231+ "name" : " Sec-Fetch-Dest" ,
232+ "value" : " empty"
233+ },
234+ {
235+ "name" : " Sec-Fetch-Mode" ,
236+ "value" : " cors"
237+ },
238+ {
239+ "name" : " Sec-Fetch-Site" ,
240+ "value" : " same-origin"
241+ },
242+ {
243+ "name" : " Authorization" ,
244+ "value" : " {{Authorization}}"
245+ },
246+ {
247+ "name" : " Connection" ,
248+ "value" : " keep-alive"
249+ },
250+ {
251+ "name" : " Cookie" ,
252+ "value" : " {{cookie}}"
253+ }
254+ ],
255+ "cookies" : []
256+ },
257+ "rule" : {
258+ "success_asserts" : [
259+ {
260+ "re" : " 200" ,
261+ "from" : " status"
262+ }
263+ ],
264+ "failed_asserts" : [],
265+ "extract_variables" : [
266+ {
267+ "name" : " streak" ,
268+ "re" : " (?<=\" streak\" :)\\ d+(?=[,}])" ,
269+ "from" : " content"
270+ },
271+ {
272+ "name" : " maxStreak" ,
273+ "re" : " (?<=\" maxStreak\" :)\\ d+(?=[,}])" ,
274+ "from" : " content"
275+ },
276+ {
277+ "name" : " isotime" ,
278+ "re" : " (?<=\" )\\ d{4}-\\ d{2}-\\ d{2}T\\ d{2}:\\ d{2}:\\ d{2}\\ .\\ d{3}Z(?=\" )" ,
279+ "from" : " content"
280+ }
281+ ]
282+ }
283+ },
284+ {
285+ "comment" : " 字符串替换" ,
286+ "request" : {
287+ "method" : " POST" ,
288+ "url" : " api://util/string/replace" ,
289+ "headers" : [],
290+ "cookies" : [],
291+ "data" : " r=json&p=Z$&s={{isotime}}&t=%2B0000"
292+ },
293+ "rule" : {
294+ "success_asserts" : [
295+ {
296+ "re" : " 200" ,
297+ "from" : " status"
298+ },
299+ {
300+ "re" : " \" 状态\" : \" OK\" " ,
301+ "from" : " content"
302+ }
303+ ],
304+ "failed_asserts" : [],
305+ "extract_variables" : [
306+ {
307+ "name" : " time0" ,
308+ "re" : " \" 处理后字符串\" : \" (.*)\" " ,
309+ "from" : " content"
310+ }
311+ ]
312+ }
313+ },
314+ {
315+ "comment" : " 返回对应时间戳和时间" ,
316+ "request" : {
317+ "method" : " POST" ,
318+ "url" : " api://util/timestamp" ,
319+ "headers" : [],
320+ "cookies" : [],
321+ "data" : " ts=&form=%Y-%m-%dT%H:%M:%S.%f%z&dt={{time0|urlencode}}"
322+ },
323+ "rule" : {
324+ "success_asserts" : [
325+ {
326+ "re" : " 200" ,
327+ "from" : " status"
328+ }
329+ ],
330+ "failed_asserts" : [],
331+ "extract_variables" : [
332+ {
333+ "name" : " bj_date" ,
334+ "re" : " \" 北京时间\"\\ s*:\\ s*\" (\\ d{4}-\\ d{2}-\\ d{2})" ,
335+ "from" : " content"
336+ },
337+ {
338+ "name" : " bj_time" ,
339+ "re" : " \" 北京时间\"\\ s*:\\ s*\"\\ d{4}-\\ d{2}-\\ d{2}T(\\ d{2}:\\ d{2}:\\ d{2})" ,
340+ "from" : " content"
341+ }
342+ ]
343+ }
344+ },
345+ {
346+ "comment" : " Unicode转换" ,
347+ "request" : {
348+ "method" : " POST" ,
349+ "url" : " api://util/unicode" ,
350+ "headers" : [],
351+ "cookies" : [],
352+ "data" : " html_unescape=false&content={{username}}(第 {{user_number}} 号会员)\\ r\\ n{% if sign_coins %}签到成功,签到时间为:{{bj_date}} {{bj_time}},本次签到获得 {{sign_coins}} 金币{% else %}{{m}}{% endif %}\\ r\\ n当前金币总数为 {{balance}} 个,已累计签到 {{streak}} 天\\ r\\ n当前用户等级为 {{level}} 级,经验值为 {{currentExp}} 点,距离升级还差 {{expToNext}} 点"
353+ },
354+ "rule" : {
355+ "success_asserts" : [
356+ {
357+ "re" : " 200" ,
358+ "from" : " status"
359+ },
360+ {
361+ "re" : " \" 状态\" : \" 200\" " ,
362+ "from" : " content"
363+ }
364+ ],
365+ "failed_asserts" : [],
366+ "extract_variables" : [
367+ {
368+ "name" : " __log__" ,
369+ "re" : " \" 转换后\" : \" (.*)\" " ,
370+ "from" : " content"
371+ }
372+ ]
373+ }
374+ }
375+ ]
0 commit comments