forked from tech-shrimp/GithubActionSample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
daily_sign.py
23 lines (19 loc) · 1.02 KB
/
daily_sign.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
import requests
cookie = os.environ.get("JD_COOKIE")
url = ("https://api.m.jd.com/client.action?functionId=signBeanAct&body=%7B%22fp%22%3A%22-1%22%2C%22shshshfp%22%3A%22-1"
"%22%2C%22shshshfpa%22%3A%22-1%22%2C%22referUrl%22%3A%22-1%22%2C%22userAgent%22%3A%22-1%22%2C%22jda%22%3A%22-1"
"%22%2C%22rnVersion%22%3A%223.9%22%7D&appid=ld&client=apple&clientVersion=10.0.4&networkType=wifi&osVersion=14"
".8.1&uuid=3acd1f6361f86fc0a1bc23971b2e7bbe6197afb6&openudid=3acd1f6361f86fc0a1bc23971b2e7bbe6197afb6&jsonp"
"=jsonp_1645885800574_58482")
headers = {"Connection": 'keep-alive',
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"Cache-Control": 'no-cache',
"User-Agent": "okhttp/3.12.1;jdmall;android;version/10.3.4;build/92451;",
"accept": "*/*",
"connection": "Keep-Alive",
"Accept-Encoding": "gzip,deflate",
"Cookie": cookie
}
response = requests.post(url=url, headers=headers)
print(response.text)