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
67b48e23
Commit
67b48e23
authored
Sep 27, 2019
by
zhiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微博超过存储错误修复
parent
4fce8f43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/main/java/com/zhiwei/searchhotcrawler/bean/WeiboTopic.java
+1
-1
src/main/java/com/zhiwei/searchhotcrawler/timer/WeiboTopicRun.java
+1
-1
No files found.
src/main/java/com/zhiwei/searchhotcrawler/bean/WeiboTopic.java
View file @
67b48e23
...
@@ -47,7 +47,7 @@ public class WeiboTopic {
...
@@ -47,7 +47,7 @@ public class WeiboTopic {
this
.
type
=
type
;
this
.
type
=
type
;
this
.
time
=
new
Date
();
this
.
time
=
new
Date
();
this
.
day
=
TimeParse
.
dateFormartString
(
new
Date
(),
"yyyy-MM-dd"
);
this
.
day
=
TimeParse
.
dateFormartString
(
new
Date
(),
"yyyy-MM-dd"
);
this
.
id
=
topicName
+
"_"
+
day
;
this
.
id
=
topicName
+
"_"
+
type
+
"_"
+
day
;
}
}
@Override
@Override
...
...
src/main/java/com/zhiwei/searchhotcrawler/timer/WeiboTopicRun.java
View file @
67b48e23
...
@@ -38,7 +38,7 @@ public class WeiboTopicRun extends Thread{
...
@@ -38,7 +38,7 @@ public class WeiboTopicRun extends Thread{
private
void
getTopicList
()
{
private
void
getTopicList
()
{
logger
.
info
(
"微博超话采集开始........"
);
logger
.
info
(
"微博超话采集开始........"
);
List
<
WeiboTopic
>
list
=
WeiboHuatiCrawler
.
startCrawler
();
List
<
WeiboTopic
>
list
=
WeiboHuatiCrawler
.
startCrawler
();
logger
.
info
(
"{}, 微博此轮采集到的数据量为:{}"
,
new
Date
(),
Integer
.
valueOf
(
list
!=
null
?
list
.
size
()
:
0
));
logger
.
info
(
"{}, 微博
超话
此轮采集到的数据量为:{}"
,
new
Date
(),
Integer
.
valueOf
(
list
!=
null
?
list
.
size
()
:
0
));
List
<
DBObject
>
data
=
new
ArrayList
<>();
List
<
DBObject
>
data
=
new
ArrayList
<>();
for
(
WeiboTopic
topic
:
list
){
for
(
WeiboTopic
topic
:
list
){
DBObject
doc
=
new
BasicDBObject
();
DBObject
doc
=
new
BasicDBObject
();
...
...
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