Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
searchhotcrawler
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
zhiwei
searchhotcrawler
Commits
40bd980d
Commit
40bd980d
authored
Jun 06, 2022
by
chenweitao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'working' into 'master'
增加36氪采集程序头部信息 See merge request
!194
parents
55ba4b19
806b0032
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
src/main/java/com/zhiwei/searchhotcrawler/crawler/HotSearch36KrCrawler.java
+8
-1
No files found.
src/main/java/com/zhiwei/searchhotcrawler/crawler/HotSearch36KrCrawler.java
View file @
40bd980d
...
...
@@ -37,8 +37,15 @@ public class HotSearch36KrCrawler {
*/
public
static
List
<
HotSearchList
>
hotSearch36Kr
(
Date
date
)
{
String
url
=
"https://www.36kr.com/hot-list/catalog"
;
Map
<
String
,
String
>
headerMap
=
new
HashMap
<>();
headerMap
.
put
(
"origin"
,
"https://www.36kr.com"
);
headerMap
.
put
(
"User-Agent"
,
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.53"
);
headerMap
.
put
(
"accept"
,
"*/*"
);
headerMap
.
put
(
"sec-ch-ua"
,
" Not A;Brand\";v=\"99\", \"Chromium\";v=\"101\", \"Microsoft Edge\";v=\"101"
);
headerMap
.
put
(
"sec-fetch-site"
,
"same-site"
);
headerMap
.
put
(
"sec-fetch-dest"
,
"empty"
);
String
htmlBody
=
null
;
Request
request
=
RequestUtils
.
wrapGet
(
url
);
Request
request
=
RequestUtils
.
wrapGet
(
url
,
headerMap
);
Response
response
=
httpBoot
.
syncCall
(
request
,
ProxySupplier
.
NAT_HEAVY_PROXY
);
if
(
response
.
hasCause
()){
Throwable
cause
=
response
.
cause
();
...
...
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