forked from zgaoliang520/langkhach270389-Scripting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shopee_checkin.js
36 lines (34 loc) · 868 Bytes
/
shopee_checkin.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
[Script]
cron "0 6 * * *" script-path=Shopee_checkin.js
http-request ^https:\/\/shopee\.vn\/me\/setting max-size=0,script-path=shopee_getcookie.js
MITM = shopee.vn
*/
var shopeeUrl = {
url: 'https://shopee.vn/mkt/coins/api/v2/checkin',
headers: {
Cookie: $persistentStore.read("CookieSP"),
}
}
$httpClient.post(shopeeUrl, function(error, response, data){
if (error) {
$notification.post("Shopee checkin", "", "Lỗi kết nối‼️")
$done();
}
else{
if(response.status == 200)
{
let obj= JSON.parse(data);
if(obj["data"]["success"])
{
var user = obj["data"]["username"];
var coins = obj["data"]["increase_coins"];
$notification.post("Shopee " + user, "", "Đã nhận được " + coins + "💰");
$done();
}
}
else{
$notification.post("Shopee Cookie đã hết hạn‼️", "", "Hãy đăng nhập lại 🔓");
}
}
});