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
848825af
Commit
848825af
authored
Nov 14, 2022
by
leiliangliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新脉脉热榜采集程序
parent
3b65725a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/main/java/com/zhiwei/searchhotcrawler/crawler/MaiMaiHotSearchCrawler.java
+4
-3
No files found.
src/main/java/com/zhiwei/searchhotcrawler/crawler/MaiMaiHotSearchCrawler.java
View file @
848825af
...
@@ -33,7 +33,7 @@ public class MaiMaiHotSearchCrawler {
...
@@ -33,7 +33,7 @@ public class MaiMaiHotSearchCrawler {
public
static
List
<
HotSearchList
>
getMaiMaiHotData
(
Date
date
){
public
static
List
<
HotSearchList
>
getMaiMaiHotData
(
Date
date
){
log
.
info
(
"脉脉热榜开始采集"
);
log
.
info
(
"脉脉热榜开始采集"
);
List
<
HotSearchList
>
list
=
new
ArrayList
<>();
List
<
HotSearchList
>
list
=
new
ArrayList
<>();
String
url
=
"https://open.taou.com/maimai/feed/v6/hot_
posts_list?tab=profession&count=15&version=5.3
.34&u=232258287&access_token=1.4c82e8ad6d6b4e03262a48f334dea336"
;
String
url
=
"https://open.taou.com/maimai/feed/v6/hot_
list_entry/feeds?page_version=2&version=6.2
.34&u=232258287&access_token=1.4c82e8ad6d6b4e03262a48f334dea336"
;
String
htmlBody
=
null
;
String
htmlBody
=
null
;
Request
request
=
RequestUtils
.
wrapGet
(
url
);
Request
request
=
RequestUtils
.
wrapGet
(
url
);
Response
response
=
httpBoot
.
syncCall
(
request
,
ProxyServerSupplier
.
NAT_HEAVY_PROXY
);
Response
response
=
httpBoot
.
syncCall
(
request
,
ProxyServerSupplier
.
NAT_HEAVY_PROXY
);
...
@@ -65,8 +65,9 @@ public class MaiMaiHotSearchCrawler {
...
@@ -65,8 +65,9 @@ public class MaiMaiHotSearchCrawler {
if
(
jsonObject
.
containsKey
(
"hot_type_card"
))
{
if
(
jsonObject
.
containsKey
(
"hot_type_card"
))
{
icon
=
jsonObject
.
getJSONObject
(
"hot_type_card"
).
getString
(
"text"
);
icon
=
jsonObject
.
getJSONObject
(
"hot_type_card"
).
getString
(
"text"
);
}
}
String
hotValue
=
jsonArray
.
getJSONObject
(
i
).
getJSONObject
(
"common"
).
getString
(
"hot_info"
);
// String hotValue = jsonArray.getJSONObject(i).getJSONObject("common").getString("hot_info");
Long
count
=
hotValue
.
length
()
>
0
?
TipsUtils
.
getHotCount
(
hotValue
)
:
0
;
// Long count = hotValue.length() > 0 ? TipsUtils.getHotCount(hotValue) : 0;
Long
count
=
null
;
HotSearchList
hotSearchList
=
new
HotSearchList
(
maimaiUrl
,
name
,
count
,
null
,
rank
,
HotSearchType
.
脉脉热榜
.
name
(),
icon
,
date
);
HotSearchList
hotSearchList
=
new
HotSearchList
(
maimaiUrl
,
name
,
count
,
null
,
rank
,
HotSearchType
.
脉脉热榜
.
name
(),
icon
,
date
);
//判断一下真实文本长度,如果大于332字符长度,则存储
//判断一下真实文本长度,如果大于332字符长度,则存储
if
(
content
.
length
()>
nameLengthMax
){
if
(
content
.
length
()>
nameLengthMax
){
...
...
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