Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zxj_js_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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangxujie
zxj_js_py
Commits
7d503b4f
Commit
7d503b4f
authored
May 21, 2024
by
zhangxujie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多抓鱼
parent
ae05bf9c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
js-py/多抓鱼/多抓鱼.js
+0
-0
js-py/多抓鱼/多抓鱼.py
+39
-0
No files found.
js-py/多抓鱼/多抓鱼.js
0 → 100644
View file @
7d503b4f
This diff is collapsed.
Click to expand it.
js-py/多抓鱼/多抓鱼.py
0 → 100644
View file @
7d503b4f
import
execjs
import
execjs
import
requests
url
=
'https://www.duozhuayu.com/api/search/book'
res_token
=
execjs
.
compile
(
open
(
'多抓鱼.js'
,
encoding
=
'utf-8'
)
.
read
())
.
call
(
'get_token'
)
print
(
res_token
)
headers
=
{
"referer"
:
"https://www.duozhuayu.com/search/book/9787541161537"
,
"user-agent"
:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
,
"x-api-version"
:
"0.0.55"
,
"x-app-platform"
:
"na"
,
"x-app-version"
:
"na"
,
"x-device-id"
:
"na"
,
"X-Refer-Request-Id"
:
''
,
"X-Request-Id"
:
res_token
.
get
(
'requestId'
),
"x-request-misc"
:
'{"platform":"browser","originSource":null,"originFrom":null,"webVersion":"1.2.294155"}'
,
"x-request-token"
:
res_token
.
get
(
'x-request-token'
),
"x-security-key"
:
str
(
res_token
.
get
(
'x-security-key'
)),
"x-timestamp"
:
str
(
res_token
.
get
(
'x-timestamp'
)),
"x-user-id"
:
"0"
}
print
(
headers
)
params
=
{
"is_in_stock_list"
:
"1"
,
"type"
:
"normal"
,
"q"
:
"9787541161537"
,
"search_from"
:
"key_press"
}
# 发送GET请求
response
=
requests
.
get
(
url
,
headers
=
headers
,
params
=
params
)
response
.
encoding
=
'utf-8'
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