-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwm-TEA.sh
executable file
·136 lines (128 loc) · 15.3 KB
/
wm-TEA.sh
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/bin/bash
# eval `ssh-agent -s`
git pull
: > wm-TEA-usItemId.txt
: > wm-TEA-currentPrice.txt
: > wm-TEA-wasPrice.txt
: > wm-TEA-availabilityStatus.txt
: > wm-TEA-orderLimit.txt
# curl -C - -Ls https://script.google.com/macros/s/AKfycbxLSohHO4ZCfamg0195s7GB77CsXz20Xa_gVlrNhKvh3EToDMarPCtgNRcsXa6W09M4nA/exec | jq '.content.names[]' | sed 's/"//g' | sed 's/.*\///g' > wm-TEA-list.txt
cookie='_ga=GA1.1.300905581.1695259774; _pxvid=52047718-581e-11ee-a865-3179d1b7486f; _m=9; userAppVersion=us-web-1.100.0-514b355-0919T0537; abqme=true; vtc=dqFmWjR_dkyGj5e05yWJtE; _pxhd=753ddcddd6a1c9ec8a1a9850d43e85b337b6f91ea10bd920ef44c4d43daf9ed1:52047718-581e-11ee-a865-3179d1b7486f; TBV=7; AID=wmlspartner%3D0%3Areflectorid%3D0000000000000000000000%3Alastupd%3D1695260163550; CID=4317c22b-5225-417f-bc33-66847d8fe66b; hasCID=1; SPID=ab021261b4c8afdde86284d2d502024799686edbfd234ac272494459a8bffd6bdbd9a9e9599c479081f48340941df3b6cprof; type=REGISTERED; _vc=fmjsFwT3KJXTBXLTAVtUjUl%2B3yJ%2BiDOz9NU3ypNHbkk%3D; sod=torbit1688246583; customer=%7B%22firstName%22%3A%22Dung%22%2C%22lastNameInitial%22%3A%22D%22%7D; userContext=eyJhZGRyZXNzRGF0YSI6bnVsbCwiaGFzSXRlbVN1YnNjcmlwdGlvbiI6ZmFsc2UsImhhc01lbWJlcnNoaXBJbmZvIjpmYWxzZSwiaXNEZWZhdWx0IjpmYWxzZSwicGF5bWVudERhdGEiOnsiY2FwaXRhbE9uZUJhbm5lclNub296ZVRTIjoxNjgxMDk2NTczNjI0LCJoYXNDYXBPbmUiOmZhbHNlLCJoYXNDYXBPbmVMaW5rZWQiOmZhbHNlLCJoYXNDcmVkaXRDYXJkIjpmYWxzZSwiaGFzRGlyZWN0ZWRTcGVuZENhcmQiOmZhbHNlLCJoYXNFQlQiOmZhbHNlLCJoYXNHaWZ0Q2FyZCI6ZmFsc2UsInNob3dDYXBPbmVCYW5uZXIiOnRydWUsIndwbHVzTm9CZW5lZml0QmFubmVyIjp0cnVlLCJwYXltZW50TWV0aG9kVGFncyI6W119LCJwcm9maWxlRGF0YSI6eyJpc0Fzc29jaWF0ZSI6ZmFsc2UsImlzVGVzdEFjY291bnQiOmZhbHNlLCJtZW1iZXJzaGlwT3B0SW4iOnsiaXNPcHRlZEluIjpmYWxzZSwib3B0ZWRJbkF0dHJpYnV0ZUlkIjoiNjQyMGJiNDYtNDYwNi00MjY1LThiZTctODY4YTIxMTcwMjE0In0sImN1c3RvbWVyVHlwZSI6IklORElWSURVQUwifSwic2hvd1NpZ25VcFNwbGFzaCI6dHJ1ZSwic29kT3B0ZWRPdXQiOnRydWUsImlhcEFzc3VyZWQiOmZhbHNlfQ%3D%3D; _astc=b3ed01c4262509a2c55d76ea1afa2aa7; pxcts=8bde898b-5855-11ee-a533-41d305ff6976; bm_mi=AB57FA6858DCF0803692BE63F7124B25~YAAQbFnKF5dEt46KAQAA9EbJthUQTGORBVu5uF0ODz0QOMNhRCwLOPDJTiZ35cwSPnceqNqyPsG6fECLFWopFk8wkTMqedwcgIl34V/SsI3RU3av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oiMjkwMyIsImlzRXhwcmVzc0RlbGl2ZXJ5T25seSI6ZmFsc2UsInN1cHBvcnRlZEFjY2Vzc1R5cGVzIjpbIkRFTElWRVJZX0FERFJFU1MiXSwic2VsZWN0aW9uVHlwZSI6IkxTX1NFTEVDVEVEIn0sInJlZnJlc2hBdCI6MTY5NTI5MTU3NzA4OCwidmFsaWRhdGVLZXkiOiJwcm9kOnYyOjQzMTdjMjJiLTUyMjUtNDE3Zi1iYzMzLTY2ODQ3ZDhmZTY2YiJ9; assortmentStoreId=2903; hasLocData=1; bstc=at512ICIaCNdXbQ0AVKEWo; mobileweb=0; xpth=x-o-mverified%2Bfalse~x-o-mart%2BB2C; xpa=-59NS|0Ppta|0kBe-|2c-Ep|41DH3|4oEVY|59tZU|5x_R7|7I8F8|7qUrE|8iEA9|AbLeI|Aj49u|BukPC|CTVU6|DZwRW|E_BK-|G-Rah|G1GxF|IYDqk|IfIls|IhmrE|JrjSN|K-KBY|K1hnx|KvYZX|L_UiE|N3ofr|N6Yhp|NFQye|PLRdE|QpMSg|S1tu0|UON2y|V8_4H|WaXaa|ZHPJB|ZQWjT|_DLQn|a7htt|bZGEj|dayNl|ein1O|g_6UP|gfN83|h-Rwh|hJuSF|htn72|hzfx4|ibyjh|ixZdu|jtmH3|kD964|kOzES|lEUOy|lKy7O|mX919|msfO8|pwlab|pyVOq|rDWW0|tkCQg|zZps3|zvNIk; exp-ck=-59NS10Ppta10kBe-141DH314oEVY159tZU15x_R717I8F817qUrE18iEA91AbLeI2BukPC1CTVU61E_BK-1G1GxF1JrjSN1K1hnx1KvYZX1L_UiE1N6Yhp2QpMSg1S1tu01UON2y1WaXaa1ZHPJB1a7htt1ein1O1g_6UP1gfN831h-Rwh1hzfx41ibyjh2ixZdu1jtmH32kD9643lEUOy1lKy7O1mX9191msfO84rDWW02tkCQg1zZps31; xptc=assortmentStoreId%2B2903; xpm=1%2B1695287978%2BdqFmWjR_dkyGj5e05yWJtE~4317c22b-5225-417f-bc33-66847d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B5zwoPTg%2BK0c%2FVpDkpI%3D; _px3=600a35d1e282301b6d40bd6bb021a87d4f167ada1f7f2d75276d3d4f3ce343d3:tRxIUao8LdlEB36pgGq2jfeuApvBBpeJDvXLnaGjXtpr/OBe812ORiNtRbkhQ2o3iLAaTnQ/OOUoMeehoKGo1g==:1000:ryfBs2QS5k4Irdjnf27bC2ssGvjhn1neE2eprdLFN8gQ6p4VabzdqMWY8gEvflba8K9Ddj7mzlg+4pHkZmpMQRQA8eQEJoWYt17Siw+D9AJCRkCY7qhkSraxg10PnLsQRP1yH9ULAh/SzoVm4bhCrHerWfLJY//vTlK0qSS2RtI5T24mqTjOhq2QmRYTm69qvf4+LRZomg/GrW+tNrIQxlWaBkDIFQzvO9RpGrFYuZc=; _pxde=15e95ec73271a7186f8188580016c901c8f18fca6fda0f3527ff1ca5472f7004:eyJ0aW1lc3RhbXAiOjE2OTUyODkxNjk3Mzh9; xptwj=qq:b5b514b05c3d2526b80a:pLSb8wBXef6Ga9gQxFGb8G7XWwCiHuPoZ/tWy+PgHUZP8kxTrPBLBjplbrVM63g9bLfP3DmKIxcYbalgvVmK63ejN3ve+y5FBGfcAm/eMdyezMGRJrhrhJVNBJqddfcr1G7PkmQ0Y+vhCOhbt72OvhbtPv33Ougey8zmA5Ep49Q8ztGhF1xXbA==; TS012768cf=0178545c9019a876c77882cefd4197a16b05a78dd0f2b1f2bc0d7ea96331e8df1513c938601e4da226fcd1c576b1b15afdacae875e; TS01a90220=0178545c9019a876c77882cefd4197a16b05a78dd0f2b1f2bc0d7ea96331e8df1513c938601e4da226fcd1c576b1b15afdacae875e; _ga_PJYG13CDGZ=GS1.1.1695283351.2.1.1695289295.0.0.0; _lat=e2898108a163b6944fe0d8bb50dc4578wmart; com.wm.reflector="reflectorid:0000000000000000000000@lastupd:1695289295000@firstcreate:1695260033434"; xptwg=3361857545:1D0751C83E39A90:498B097:F0247BCC:F4C28870:56E3505A:; TS2a5e0c5c027=0881c5dd0aab2000836ddcf70da02df5f1ff29e4e4f9a908fdc7fb1d3beff480362b0a23e9e3791d0869672d87113000f25a6d14df477ea1a10b6ea787d99114d22d3debed69b2f0e35e496a52d48b8e905975b0ef8b7cf57208a88e2f3dc6a4'
while read line
do
# array=(${line//|/ })
while true
do
list=`curl -C - -Ls 'https://www.walmart.com/orchestra/home/graphql/getListDetails/9c473c83d05f86b605d982c553d220cd0d7014a0cdd727836da8bf91eaecc121?variables=%7B%22input%22%3A%7B%22id%22%3A%22'$line'%22%2C%22listType%22%3A%22WL%22%2C%22pagination%22%3A%7B%22page%22%3A1%2C%22pageSize%22%3A100%7D%2C%22sortOrder%22%3A%22DEFAULT%22%2C%22maxItems%22%3Afalse%2C%22skipGeneric%22%3Afalse%2C%22permission%22%3A%22VIEW%22%7D%2C%22groupsEnable%22%3Afalse%7D' \
-H 'authority: www.walmart.com' \
-H 'accept: application/json' \
-H 'accept-language: en-US' \
-H 'content-type: application/json' \
-H 'cookie: '$cookie'' \
-H 'device_profile_ref_id: 4vihg2lpwwbzggqeow3rjzv_ag2eguz6cz-t' \
-H 'dnt: 1' \
-H 'downlink: 10' \
-H 'dpr: 2' \
-H 'lists-device-type: desktop' \
-H 'sec-ch-ua: "Microsoft Edge";v="117", "Not;A=Brand";v="8", "Chromium";v="117"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'traceparent: 00-c61c2a326098db40a1d3eebea54bfeba-a29e9a8c600bafc1-00' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.35' \
-H 'wm_mp: true' \
-H 'wm_qos.correlation_id: YIKkB93kLuv1cIGDbKAo9KuGwIf4l3jAp00o' \
-H 'x-apollo-operation-name: getListDetails' \
-H 'x-enable-server-timing: 1' \
-H 'x-latency-trace: 1' \
-H 'x-o-bu: WALMART-US' \
-H 'x-o-ccm: server' \
-H 'x-o-correlation-id: YIKkB93kLuv1cIGDbKAo9KuGwIf4l3jAp00o' \
-H 'x-o-gql-query: query getListDetails' \
-H 'x-o-mart: B2C' \
-H 'x-o-platform: rweb' \
-H 'x-o-platform-version: us-web-1.100.0-514b355-0919T0537' \
-H 'x-o-segment: oaoh' \
--compressed`
list2=`curl -C - -Ls 'https://www.walmart.com/orchestra/home/graphql/getListDetails/9c473c83d05f86b605d982c553d220cd0d7014a0cdd727836da8bf91eaecc121?variables=%7B%22input%22%3A%7B%22id%22%3A%22'$line'%22%2C%22listType%22%3A%22WL%22%2C%22pagination%22%3A%7B%22page%22%3A2%2C%22pageSize%22%3A100%7D%2C%22sortOrder%22%3A%22DEFAULT%22%2C%22maxItems%22%3Afalse%2C%22skipGeneric%22%3Afalse%2C%22permission%22%3A%22VIEW%22%7D%2C%22groupsEnable%22%3Afalse%7D' \
-H 'authority: www.walmart.com' \
-H 'accept: application/json' \
-H 'accept-language: en-US' \
-H 'content-type: application/json' \
-H 'cookie: '$cookie'' \
-H 'device_profile_ref_id: 4vihg2lpwwbzggqeow3rjzv_ag2eguz6cz-t' \
-H 'dnt: 1' \
-H 'downlink: 10' \
-H 'dpr: 2' \
-H 'lists-device-type: desktop' \
-H 'sec-ch-ua: "Microsoft Edge";v="117", "Not;A=Brand";v="8", "Chromium";v="117"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'traceparent: 00-c61c2a326098db40a1d3eebea54bfeba-a29e9a8c600bafc1-00' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.35' \
-H 'wm_mp: true' \
-H 'wm_qos.correlation_id: YIKkB93kLuv1cIGDbKAo9KuGwIf4l3jAp00o' \
-H 'x-apollo-operation-name: getListDetails' \
-H 'x-enable-server-timing: 1' \
-H 'x-latency-trace: 1' \
-H 'x-o-bu: WALMART-US' \
-H 'x-o-ccm: server' \
-H 'x-o-correlation-id: YIKkB93kLuv1cIGDbKAo9KuGwIf4l3jAp00o' \
-H 'x-o-gql-query: query getListDetails' \
-H 'x-o-mart: B2C' \
-H 'x-o-platform: rweb' \
-H 'x-o-platform-version: us-web-1.100.0-514b355-0919T0537' \
-H 'x-o-segment: oaoh' \
--compressed`
if [[ $list =~ "blocked" ]]
then
link=`echo $list | jq '.redirectUrl' | sed 's/"//g'`
`open -n -a /Applications/Microsoft\ Edge.app --args --profile-directory=Default https://walmart.com$link`
read -p "blocked"
echo 'Thoát script'
exit 1
else
echo $list | jq '.data.shoppingListDetails.items.listItems[].product.usItemId' >> wm-TEA-usItemId.txt
echo $list2 | jq '.data.shoppingListDetails.items.listItems[].product.usItemId' >> wm-TEA-usItemId.txt
echo $list | jq '.data.shoppingListDetails.items.listItems[].product.priceInfo.currentPrice.price' >> wm-TEA-currentPrice.txt
echo $list2 | jq '.data.shoppingListDetails.items.listItems[].product.priceInfo.currentPrice.price' >> wm-TEA-currentPrice.txt
echo $list | jq '.data.shoppingListDetails.items.listItems[].product.priceInfo.wasPrice.price' | sed 's/null//g' >> wm-TEA-wasPrice.txt
echo $list2 | jq '.data.shoppingListDetails.items.listItems[].product.priceInfo.wasPrice.price' | sed 's/null//g' >> wm-TEA-wasPrice.txt
echo $list | jq '.data.shoppingListDetails.items.listItems[].product.availabilityStatus' >> wm-TEA-availabilityStatus.txt
echo $list2 | jq '.data.shoppingListDetails.items.listItems[].product.availabilityStatus' >> wm-TEA-availabilityStatus.txt
echo $list | jq '.data.shoppingListDetails.items.listItems[].product.orderLimit' >> wm-TEA-orderLimit.txt
echo $list2 | jq '.data.shoppingListDetails.items.listItems[].product.orderLimit' >> wm-TEA-orderLimit.txt
echo ${line[0]}
break
fi
done
done < input-TEA-list.txt
git add -A .
git commit -m --allow-empty
git push
git push origin HEAD -f
gitCommit=`git rev-parse HEAD`
linkGit=`echo https://raw.githubusercontent.com/DungSherlock/eBay/`$gitCommit`echo /`
apiTEA=`echo https://script.google.com/macros/s/AKfycbwZhHTYAL-sJk_aksJrXbxwrsiOwp4Hn6kUU0fpgKQiDPU7gH5LjoaujT2jBAf-rvIy/exec?`
apiMILK=`echo https://script.google.com/macros/s/AKfycbwqVEwK8UXmhfZmhFVoNs97bIVKLqGUoAtQm8tBEbHEIit4QcHVywZxcXSZaxn0n5g8cA/exec?`
linkPostTEA=$apiTEA`echo LinkID==IMPORTDATA\(\"`$linkGit`echo wm-TEA-usItemId.txt\"\)\
\&GiaHienTai==IMPORTDATA\(\"`$linkGit`echo wm-TEA-currentPrice.txt\"\)\
\&TrangThaiHang==IMPORTDATA\(\"`$linkGit`echo wm-TEA-availabilityStatus.txt\"\)\
\&Quantity==IMPORTDATA\(\"`$linkGit`echo wm-TEA-orderLimit.txt\"\)
`
linkPostMILK=$apiMILK`echo LinkID==IMPORTDATA\(\"`$linkGit`echo wm-TEA-usItemId.txt\"\)\
\&GiaHienTai==IMPORTDATA\(\"`$linkGit`echo wm-TEA-currentPrice.txt\"\)\
\&TrangThaiHang==IMPORTDATA\(\"`$linkGit`echo wm-TEA-availabilityStatus.txt\"\)\
\&Quantity==IMPORTDATA\(\"`$linkGit`echo wm-TEA-orderLimit.txt\"\)
`
# echo '[InternetShortcut]\
# URL='$linkPostTEA > wm-TEA.url
# open wm-TEA.url
echo '[InternetShortcut]\
URL='$linkPostMILK > wm-MILK.url
open wm-MILK.url