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
8328e32d
Commit
8328e32d
authored
Jul 15, 2021
by
leiliangliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
快手热榜url字段采集更新
parent
b1b3eecd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
src/main/java/com/zhiwei/searchhotcrawler/crawler/KuaiShouHotSearchCrawler.java
+4
-1
src/main/java/com/zhiwei/searchhotcrawler/test/KuaiShouHotSearchCrawlerTest.java
+5
-1
src/main/java/com/zhiwei/searchhotcrawler/test/KuaiShouHotSearchRun.java
+2
-1
No files found.
src/main/java/com/zhiwei/searchhotcrawler/crawler/KuaiShouHotSearchCrawler.java
View file @
8328e32d
...
@@ -72,7 +72,10 @@ public class KuaiShouHotSearchCrawler {
...
@@ -72,7 +72,10 @@ public class KuaiShouHotSearchCrawler {
Double
d
=
Double
.
valueOf
(
ws
[
0
])*
10000
;
Double
d
=
Double
.
valueOf
(
ws
[
0
])*
10000
;
long
hot
=
d
.
longValue
();
long
hot
=
d
.
longValue
();
//话题链接
//话题链接
String
url
=
object
.
getString
(
"poster"
);
String
ul
=
object
.
getString
(
"poster"
);
String
[]
split
=
ul
.
split
(
"clientCacheKey="
);
String
s
=
split
[
1
].
substring
(
0
,
15
);
String
url
=
"https://www.kuaishou.com/short-video/"
+
s
+
"?trendingId="
+
name
;
//标签类型
//标签类型
String
tagType
=
null
;
String
tagType
=
null
;
if
(
object
.
containsKey
(
"tagType"
)){
if
(
object
.
containsKey
(
"tagType"
)){
...
...
src/main/java/com/zhiwei/searchhotcrawler/test/KuaiShouHotSearchCrawlerTest.java
View file @
8328e32d
...
@@ -73,7 +73,11 @@ public class KuaiShouHotSearchCrawlerTest {
...
@@ -73,7 +73,11 @@ public class KuaiShouHotSearchCrawlerTest {
Double
d
=
Double
.
valueOf
(
ws
[
0
])*
10000
;
Double
d
=
Double
.
valueOf
(
ws
[
0
])*
10000
;
long
hot
=
d
.
longValue
();
long
hot
=
d
.
longValue
();
//话题链接
//话题链接
String
url
=
object
.
getString
(
"poster"
);
String
ul
=
object
.
getString
(
"poster"
);
String
[]
split
=
ul
.
split
(
"clientCacheKey="
);
String
s
=
split
[
1
].
substring
(
0
,
15
);
System
.
out
.
println
(
s
);
String
url
=
"https://www.kuaishou.com/short-video/"
+
s
+
"?trendingId="
+
name
;
//标签类型
//标签类型
String
tagType
=
null
;
String
tagType
=
null
;
if
(
object
.
containsKey
(
"tagType"
)){
if
(
object
.
containsKey
(
"tagType"
)){
...
...
src/main/java/com/zhiwei/searchhotcrawler/test/KuaiShouHotSearchRun.java
View file @
8328e32d
...
@@ -2,6 +2,7 @@ package com.zhiwei.searchhotcrawler.test;
...
@@ -2,6 +2,7 @@ package com.zhiwei.searchhotcrawler.test;
import
com.zhiwei.searchhotcrawler.bean.HotSearchList
;
import
com.zhiwei.searchhotcrawler.bean.HotSearchList
;
import
com.zhiwei.searchhotcrawler.crawler.BaiDuHotSearchCrawler
;
import
com.zhiwei.searchhotcrawler.crawler.BaiDuHotSearchCrawler
;
import
com.zhiwei.searchhotcrawler.crawler.KuaiShouHotSearchCrawler
;
import
com.zhiwei.searchhotcrawler.crawler.SougoHotSearchCrawler
;
import
com.zhiwei.searchhotcrawler.crawler.SougoHotSearchCrawler
;
import
com.zhiwei.searchhotcrawler.crawler.ZhihuHotSearchCrawler
;
import
com.zhiwei.searchhotcrawler.crawler.ZhihuHotSearchCrawler
;
import
com.zhiwei.searchhotcrawler.util.TipsUtils
;
import
com.zhiwei.searchhotcrawler.util.TipsUtils
;
...
@@ -32,7 +33,7 @@ public class KuaiShouHotSearchRun extends Thread{
...
@@ -32,7 +33,7 @@ public class KuaiShouHotSearchRun extends Thread{
private
void
getHotList
()
{
private
void
getHotList
()
{
log
.
info
(
"快手热榜采集开始........"
);
log
.
info
(
"快手热榜采集开始........"
);
List
<
HotSearchList
>
kuaiShouList
=
KuaiShouHotSearchCrawler
Test
.
KuaiShouHotSearchCrawler
(
new
Date
());
List
<
HotSearchList
>
kuaiShouList
=
KuaiShouHotSearchCrawler
.
KuaiShouHotSearchCrawler
(
new
Date
());
log
.
info
(
"{}, 此轮快手热榜采集到的数据量为:{}"
,
new
Date
(),
Integer
.
valueOf
(
kuaiShouList
!=
null
?
kuaiShouList
.
size
()
:
0
));
log
.
info
(
"{}, 此轮快手热榜采集到的数据量为:{}"
,
new
Date
(),
Integer
.
valueOf
(
kuaiShouList
!=
null
?
kuaiShouList
.
size
()
:
0
));
TipsUtils
.
addHotList
(
"快手热榜"
,
kuaiShouList
);
TipsUtils
.
addHotList
(
"快手热榜"
,
kuaiShouList
);
log
.
info
(
"快手热榜采集结束........"
);
log
.
info
(
"快手热榜采集结束........"
);
...
...
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