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
706e02e0
Commit
706e02e0
authored
Mar 06, 2020
by
zhiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除无用的log及修改主键组合方式,添加微博话题采集
parent
5250248e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
5 deletions
+3
-5
src/main/java/com/zhiwei/searchhotcrawler/bean/HotSearchList.java
+3
-3
src/main/java/com/zhiwei/searchhotcrawler/crawler/WeiboHotSearchCrawler.java
+0
-1
src/main/java/com/zhiwei/searchhotcrawler/crawler/WeiboSuperTopicCrawler.java
+0
-1
No files found.
src/main/java/com/zhiwei/searchhotcrawler/bean/HotSearchList.java
View file @
706e02e0
...
@@ -87,7 +87,7 @@ public class HotSearchList implements Serializable{
...
@@ -87,7 +87,7 @@ public class HotSearchList implements Serializable{
public
HotSearchList
(){}
public
HotSearchList
(){}
public
HotSearchList
(
String
url
,
String
name
,
Integer
count
,
Boolean
hot
,
Integer
rank
,
String
type
,
String
icon
){
public
HotSearchList
(
String
url
,
String
name
,
Integer
count
,
Boolean
hot
,
Integer
rank
,
String
type
,
String
icon
){
this
.
id
=
name
+
"_"
+
new
Date
().
getTime
();
this
.
id
=
name
+
"_"
+
new
Date
().
getTime
()
+
"_"
+
type
;
this
.
url
=
url
;
this
.
url
=
url
;
this
.
name
=
name
;
this
.
name
=
name
;
this
.
count
=
count
;
this
.
count
=
count
;
...
@@ -101,7 +101,7 @@ public class HotSearchList implements Serializable{
...
@@ -101,7 +101,7 @@ public class HotSearchList implements Serializable{
public
HotSearchList
(
String
url
,
String
name
,
Integer
count
,
Integer
rank
,
String
type
){
public
HotSearchList
(
String
url
,
String
name
,
Integer
count
,
Integer
rank
,
String
type
){
this
.
id
=
name
+
"_"
+
new
Date
().
getTime
();
this
.
id
=
name
+
"_"
+
new
Date
().
getTime
()
+
"_"
+
type
;
this
.
url
=
url
;
this
.
url
=
url
;
this
.
name
=
name
;
this
.
name
=
name
;
this
.
count
=
count
;
this
.
count
=
count
;
...
@@ -114,7 +114,7 @@ public class HotSearchList implements Serializable{
...
@@ -114,7 +114,7 @@ public class HotSearchList implements Serializable{
public
HotSearchList
(
String
url
,
String
name
,
Integer
count
,
Integer
rank
,
String
type
,
Integer
commentCount
,
String
topicLead
){
public
HotSearchList
(
String
url
,
String
name
,
Integer
count
,
Integer
rank
,
String
type
,
Integer
commentCount
,
String
topicLead
){
this
.
id
=
name
+
"_"
+
new
Date
().
getTime
();
this
.
id
=
name
+
"_"
+
new
Date
().
getTime
()
+
"_"
+
type
;
this
.
url
=
url
;
this
.
url
=
url
;
this
.
name
=
name
;
this
.
name
=
name
;
this
.
count
=
count
;
this
.
count
=
count
;
...
...
src/main/java/com/zhiwei/searchhotcrawler/crawler/WeiboHotSearchCrawler.java
View file @
706e02e0
...
@@ -139,7 +139,6 @@ public class WeiboHotSearchCrawler {
...
@@ -139,7 +139,6 @@ public class WeiboHotSearchCrawler {
}
}
String
id
=
"http://s.weibo.com/weibo/"
+
URLCodeUtil
.
getURLEncode
(
name
,
"utf-8"
)
+
"&Refer=top"
;
String
id
=
"http://s.weibo.com/weibo/"
+
URLCodeUtil
.
getURLEncode
(
name
,
"utf-8"
)
+
"&Refer=top"
;
HotSearchList
hotSearch
=
new
HotSearchList
(
id
,
name
,
hotCount
,
hot
,
rank
,
HotSearchType
.
微博热搜
.
name
(),
icon
);
HotSearchList
hotSearch
=
new
HotSearchList
(
id
,
name
,
hotCount
,
hot
,
rank
,
HotSearchType
.
微博热搜
.
name
(),
icon
);
log
.
info
(
"采集到的数据:::{}"
,
hotSearch
);
result
.
add
(
hotSearch
);
result
.
add
(
hotSearch
);
rank
++;
rank
++;
}
}
...
...
src/main/java/com/zhiwei/searchhotcrawler/crawler/WeiboSuperTopicCrawler.java
View file @
706e02e0
...
@@ -114,7 +114,6 @@ public class WeiboSuperTopicCrawler {
...
@@ -114,7 +114,6 @@ public class WeiboSuperTopicCrawler {
WeiboSuperTopic
topic
=
new
WeiboSuperTopic
(
url
,
topicName
,
toprank
,
score
,
fensi
,
type
);
WeiboSuperTopic
topic
=
new
WeiboSuperTopic
(
url
,
topicName
,
toprank
,
score
,
fensi
,
type
);
topic
=
getTopicInfo
(
id
,
topic
);
topic
=
getTopicInfo
(
id
,
topic
);
System
.
out
.
println
(
"topic====="
+
topic
);
topicList
.
add
(
topic
);
topicList
.
add
(
topic
);
}
}
return
topicList
;
return
topicList
;
...
...
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