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
2d81b0b1
Commit
2d81b0b1
authored
Sep 17, 2021
by
chenweitao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'working' into 'master'
Working See merge request
!131
parents
d431fc6a
f6691b98
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
src/main/java/com/zhiwei/searchhotcrawler/crawler/WeiboHotSearchCrawler.java
+10
-2
No files found.
src/main/java/com/zhiwei/searchhotcrawler/crawler/WeiboHotSearchCrawler.java
View file @
2d81b0b1
...
...
@@ -169,14 +169,22 @@ public class WeiboHotSearchCrawler {
String
name
=
cardInfo
.
getString
(
"desc"
);
String
desc_extr
=
cardInfo
.
getString
(
"desc_extr"
);
String
heatLabel
=
null
;
Long
hotCount
=
null
;
Long
hotCount
=
0L
;
if
(!
StringUtils
.
isEmpty
(
desc_extr
)&&
Objects
.
nonNull
(
desc_extr
)){
String
regEx
=
"[^0-9]"
;
Pattern
p
=
Pattern
.
compile
(
regEx
);
Matcher
m
=
p
.
matcher
(
desc_extr
);
String
num
=
m
.
replaceAll
(
""
).
trim
();
hotCount
=
Long
.
valueOf
(
num
);
heatLabel
=
desc_extr
.
split
(
" "
)[
0
];
String
[]
split
=
desc_extr
.
split
(
" "
);
if
(
split
.
length
>
1
){
String
heat
=
split
[
0
].
trim
();
boolean
flag
=
StringUtils
.
isNumeric
(
heat
);
if
(!
flag
){
heatLabel
=
split
[
0
].
trim
();
}
}
}
String
iconUrl
=
cardInfo
.
getString
(
"icon"
);
String
icon
=
null
;
...
...
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