Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
doudian-py
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiquan
doudian-py
Commits
fd1436b5
Commit
fd1436b5
authored
Jun 20, 2025
by
baiquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test.py
parent
c402c089
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
test.py
+38
-0
No files found.
test.py
0 → 100644
View file @
fd1436b5
import
json
from
urllib.parse
import
urlencode
import
execjs
import
requests
cookie
=
{
"PHPSESSID"
:
"b128fd38e72c3875d6962d7b7f99c079"
,
"PHPSESSID_SS"
:
"b128fd38e72c3875d6962d7b7f99c079"
,
}
headers
=
{
"accept"
:
"application/json, text/plain, */*"
,
"accept-language"
:
"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"
,
"Connection"
:
"keep-alive"
,
"origin"
:
"https://fxg.jinritemai.com"
,
"referer"
:
"https://fxg.jinritemai.com"
,
"Sec-Fetch-Dest"
:
"empty"
,
"Sec-Fetch-Mode"
:
"cors"
,
"Sec-Fetch-Site"
:
"same-site"
,
"X-Requested-With"
:
"XMLHttpRequest"
,
"priority"
:
"u=1, i"
,
"user-agent"
:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.6778.24 Safari/537.36"
,
"sec-ch-ua"
:
'Google Chrome";v = "131", "Chromium";v = "131", "Not_A Brand";v = "24"'
}
params
=
{
'appid'
:
1
,
'_bid'
:
'ffa_goods'
,
'msToken'
:
'gD02GzA25s53snK2vlsuGgbyPgGz4CtKfF6CqWC1yMRUfV3BoBeguWbFohK=CaaAYWNhXh28t=vy7WgmEdRYCbBRdFSfsnQOxoOE4CnyxlhQHAQX3oQTeukZfVZWankQX=pqUriUDfhzAKKkPS4qcE87bWlng2P8'
}
json_data
=
{
'context'
:
{
'feature'
:
{},
'operation_type'
:
'select_normal,normal'
,
'category_id'
:
'26764'
,
'ability'
:
[]},
'appid'
:
1
,
'_bid'
:
'ffa_goods'
}
url
=
'https://fxg.jinritemai.com/product/tproduct/getSchema'
url_params
=
urlencode
(
params
)
with
open
(
"./js/a_bogus.js"
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
js_code
=
f
.
read
()
ctx
=
execjs
.
compile
(
js_code
)
data
=
json
.
dumps
(
json_data
)
ab
=
ctx
.
call
(
'get_ab'
,
url_params
,
data
,
headers
[
'user-agent'
])
params
[
'a_bogus'
]
=
ab
# params['a_bogus'] = "DXWhQRu6dk2ivfmk5fCLfY3qV-zfYsuY0SVkMDheJaV-/y39HMOP9exYg/Xv8LbexG/ZIbDjy4hbO3xprQAjM36UHmJx/2aBmDSkKl5Q59YC53ineyfQE0hO-ib3SFad5XNdECifqiKGKuRplnl60fAAPeb="
response
=
requests
.
post
(
url
,
params
=
params
,
cookies
=
cookie
,
headers
=
headers
,
json
=
json_data
)
print
(
response
.
text
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment