Spaces:
Running
Running
rogerxavier
commited on
Commit
•
aa9cce6
1
Parent(s):
b57eaff
Update utils.py
Browse files
utils.py
CHANGED
@@ -8,15 +8,43 @@ session = requests.Session()
|
|
8 |
urlBase = 'https://jingling.bifangpu.com'
|
9 |
purchaseBase = urlBase+"/api/resource/purchase"
|
10 |
|
11 |
-
#截止时间信息: jinglingpan:sessid=3685012c-6913-49fb-86d3-815b30601597; path=/; expires=Fri, 02 Aug 2024 13:22:47 GMT, jinglingpan:sessid.sig=ESZRgMwxvb5eols3kmXSi3ybKAw; path=/; expires=Fri, 02 Aug 2024 13:22:47 GMT
|
12 |
-
cookie={"jinglingpan:sessid": "3685012c-6913-49fb-86d3-815b30601597", "jinglingpan:sessid.sig": "ESZRgMwxvb5eols3kmXSi3ybKAw"}
|
13 |
-
|
14 |
-
|
15 |
-
session.cookies = requests.utils.cookiejar_from_dict(cookie)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
headers = {
|
18 |
"authority": "jingling.bifangpu.com",
|
19 |
"method": "GET",
|
|
|
20 |
"path": "/resource/detail/b01940f0f34e6ca91f68b258362d50f1",
|
21 |
"scheme": "https",
|
22 |
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
|
|
8 |
urlBase = 'https://jingling.bifangpu.com'
|
9 |
purchaseBase = urlBase+"/api/resource/purchase"
|
10 |
|
11 |
+
# #截止时间信息: jinglingpan:sessid=3685012c-6913-49fb-86d3-815b30601597; path=/; expires=Fri, 02 Aug 2024 13:22:47 GMT, jinglingpan:sessid.sig=ESZRgMwxvb5eols3kmXSi3ybKAw; path=/; expires=Fri, 02 Aug 2024 13:22:47 GMT
|
12 |
+
# cookie={"jinglingpan:sessid": "3685012c-6913-49fb-86d3-815b30601597", "jinglingpan:sessid.sig": "ESZRgMwxvb5eols3kmXSi3ybKAw"}
|
13 |
+
|
14 |
+
|
15 |
+
# session.cookies = requests.utils.cookiejar_from_dict(cookie)
|
16 |
+
|
17 |
+
# headers = {
|
18 |
+
# "authority": "jingling.bifangpu.com",
|
19 |
+
# "method": "GET",
|
20 |
+
# "path": "/resource/detail/b01940f0f34e6ca91f68b258362d50f1",
|
21 |
+
# "scheme": "https",
|
22 |
+
# "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
23 |
+
# "Accept-Encoding": "gzip, deflate, br, zstd",
|
24 |
+
# "Accept-Language": "zh-CN,zh;q=0.9",
|
25 |
+
# "Cache-Control": "max-age=0",
|
26 |
+
# "Dnt": "1",
|
27 |
+
# "If-None-Match": "\"5b56-ChT6C0U9s3iYKFMBV41XLcqXxRc\"",
|
28 |
+
# "Priority": "u=0, i",
|
29 |
+
# "Sec-Ch-Ua": "\"Not/A)Brand\";v=\"8\", \"Chromium\";v=\"126\", \"Google Chrome\";v=\"126\"",
|
30 |
+
# "Sec-Ch-Ua-Mobile": "?0",
|
31 |
+
# "Sec-Ch-Ua-Platform": "\"Windows\"",
|
32 |
+
# "Sec-Fetch-Dest": "document",
|
33 |
+
# "Sec-Fetch-Mode": "navigate",
|
34 |
+
# "Sec-Fetch-Site": "same-origin",
|
35 |
+
# "Sec-Fetch-User": "?1",
|
36 |
+
# "Upgrade-Insecure-Requests": "1",
|
37 |
+
# "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
|
38 |
+
# }
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
cookie_str ='_ga=GA1.2.391687567.1721269988; _gid=GA1.2.1532584807.1721364777; jinglingpan:sessid=678986e8-8f1c-40d7-82c7-01ec3afede65; jinglingpan:sessid.sig=zM0_iCuVe3wphAPiAHljhtL5PoE; Hm_lvt_19198da8061c292cacd55088bd6e3eba=1721364777,1721395448; HMACCOUNT=B1C6D796AC29E639; _gat=1; _ga_Y024PNQKTV=GS1.2.1721395448.4.1.1721395455.0.0.0; Hm_lpvt_19198da8061c292cacd55088bd6e3eba=1721395468'
|
43 |
|
44 |
headers = {
|
45 |
"authority": "jingling.bifangpu.com",
|
46 |
"method": "GET",
|
47 |
+
"Cookie":cookie_str,
|
48 |
"path": "/resource/detail/b01940f0f34e6ca91f68b258362d50f1",
|
49 |
"scheme": "https",
|
50 |
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|