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
672054e6
Commit
672054e6
authored
Jan 11, 2022
by
chenweitao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'working' into 'master'
更新快手采集程序 See merge request
!171
parents
78ec2769
8fc1718a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/main/java/com/zhiwei/searchhotcrawler/crawler/KuaiShouHotSearchCrawler.java
+5
-5
No files found.
src/main/java/com/zhiwei/searchhotcrawler/crawler/KuaiShouHotSearchCrawler.java
View file @
672054e6
...
@@ -53,9 +53,9 @@ public class KuaiShouHotSearchCrawler {
...
@@ -53,9 +53,9 @@ public class KuaiShouHotSearchCrawler {
List
<
HotSearchList
>
list
=
new
ArrayList
<>();
List
<
HotSearchList
>
list
=
new
ArrayList
<>();
JSONObject
jsonObject
=
null
;
JSONObject
jsonObject
=
null
;
try
{
try
{
String
substring
=
htmlBody
.
substring
(
htmlBody
.
indexOf
(
"homexxunknown"
)+
15
,
htmlBody
.
indexOf
(
"homexx
filmcom
list"
)+
18
);
String
substring
=
htmlBody
.
substring
(
htmlBody
.
indexOf
(
"homexxunknown"
)+
15
,
htmlBody
.
indexOf
(
"homexx
thea
list"
)+
18
);
String
sub
=
"{"
+
substring
.
substring
(
substring
.
indexOf
(
"VisionHotRankResult"
)
+
22
,
substring
.
indexOf
(
"
llsid
"
)
-
2
)+
"}}"
;
String
sub
=
"{"
+
substring
.
substring
(
substring
.
indexOf
(
"VisionHotRankResult"
)
+
22
,
substring
.
indexOf
(
"
homexxthealist
"
)
-
2
)+
"}}"
;
String
substring1
=
sub
.
substring
(
0
,
sub
.
indexOf
(
"
$ROOT_QUERY.visionMovieRank"
)
-
2
)+
"}"
;
String
substring1
=
sub
.
substring
(
0
,
sub
.
indexOf
(
"
VisionHotRankItem\"},\"$ROOT"
)
+
19
)+
"}"
;
jsonObject
=
JSONObject
.
parseObject
(
substring1
);
jsonObject
=
JSONObject
.
parseObject
(
substring1
);
//获取每个jsonObject对象的值
//获取每个jsonObject对象的值
Collection
<
Object
>
values
=
jsonObject
.
values
();
Collection
<
Object
>
values
=
jsonObject
.
values
();
...
@@ -83,11 +83,11 @@ public class KuaiShouHotSearchCrawler {
...
@@ -83,11 +83,11 @@ public class KuaiShouHotSearchCrawler {
}
}
HotSearchList
hotSearchList
=
new
HotSearchList
(
url
,
name
,
hot
,
true
,
rank
,
HotSearchType
.
快手热榜
.
name
(),
tagType
,
date
);
HotSearchList
hotSearchList
=
new
HotSearchList
(
url
,
name
,
hot
,
true
,
rank
,
HotSearchType
.
快手热榜
.
name
(),
tagType
,
date
);
list
.
add
(
hotSearchList
);
list
.
add
(
hotSearchList
);
}
catch
(
NumberFormat
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"解析快手热榜时出现解析错误"
,
e
);
log
.
error
(
"解析快手热榜时出现解析错误"
,
e
);
}
}
}
}
}
catch
(
NumberFormat
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"解析快手热榜时出现解析错误,数据不是json结构"
,
e
);
log
.
error
(
"解析快手热榜时出现解析错误,数据不是json结构"
,
e
);
}
}
return
list
;
return
list
;
...
...
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